mirror of
https://github.com/apotdevin/thunderhub.git
synced 2024-11-19 09:50:03 +01:00
Merge pull request #229 from apotdevin/refactor-forwards
refactor: forwards query
This commit is contained in:
commit
350096d2c2
@ -101,7 +101,7 @@ const ForwardsView = () => {
|
||||
<Separation />
|
||||
<ForwardChannelsReport days={days} order={infoType} />
|
||||
</Card>
|
||||
<SubTitle>Grouped by Peer</SubTitle>
|
||||
<SubTitle>Grouped by Channel</SubTitle>
|
||||
<Card>
|
||||
<ForwardTable days={days} order={infoType} />
|
||||
</Card>
|
||||
|
@ -14,6 +14,7 @@ export const RateConfig: RateConfigProps = {
|
||||
chainBalance: { max: 10, window: '5s' },
|
||||
pendingChainBalance: { max: 10, window: '5s' },
|
||||
channelBalance: { max: 10, window: '5s' },
|
||||
getChannel: { max: 1000, window: '5s' },
|
||||
};
|
||||
|
||||
const rateLimiter = getGraphQLRateLimiter({
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { logger } from 'server/helpers/logger';
|
||||
import { toWithError } from 'server/helpers/async';
|
||||
import { getChannel } from 'ln-service';
|
||||
import { getChannel as getLnChannel } from 'ln-service';
|
||||
import { ChannelType, GetChannelType } from 'server/types/ln-service.types';
|
||||
import { openChannel } from './resolvers/mutation/openChannel';
|
||||
import { closeChannel } from './resolvers/mutation/closeChannel';
|
||||
@ -10,6 +10,7 @@ import { getChannelBalance } from './resolvers/query/getChannelBalance';
|
||||
import { getChannels } from './resolvers/query/getChannels';
|
||||
import { getClosedChannels } from './resolvers/query/getClosedChannels';
|
||||
import { getPendingChannels } from './resolvers/query/getPendingChannels';
|
||||
import { getChannel } from './resolvers/query/getChannel';
|
||||
|
||||
type ParentType = {
|
||||
id: string;
|
||||
@ -21,6 +22,7 @@ type ParentType = {
|
||||
|
||||
export const channelResolvers = {
|
||||
Query: {
|
||||
getChannel,
|
||||
getChannelBalance,
|
||||
getChannels,
|
||||
getClosedChannels,
|
||||
@ -48,7 +50,7 @@ export const channelResolvers = {
|
||||
}
|
||||
|
||||
const [channel, error] = await toWithError<GetChannelType>(
|
||||
getChannel({ lnd, id })
|
||||
getLnChannel({ lnd, id })
|
||||
);
|
||||
|
||||
if (error) {
|
||||
|
42
server/schema/channel/resolvers/query/getChannel.ts
Normal file
42
server/schema/channel/resolvers/query/getChannel.ts
Normal file
@ -0,0 +1,42 @@
|
||||
import { getChannel as getLnChannel } from 'ln-service';
|
||||
import { ContextType } from 'server/types/apiTypes';
|
||||
import { to } from 'server/helpers/async';
|
||||
import { requestLimiter } from 'server/helpers/rateLimiter';
|
||||
import { GetChannelType } from 'server/types/ln-service.types';
|
||||
|
||||
export const getChannel = async (
|
||||
_: undefined,
|
||||
{ id, pubkey }: { id: string; pubkey?: string },
|
||||
{ ip, lnd }: ContextType
|
||||
) => {
|
||||
await requestLimiter(ip, 'getChannel');
|
||||
|
||||
const channel = await to<GetChannelType>(getLnChannel({ lnd, id }));
|
||||
|
||||
if (!pubkey) {
|
||||
return channel;
|
||||
}
|
||||
|
||||
let node_policies = null;
|
||||
let partner_node_policies = null;
|
||||
|
||||
channel.policies.forEach(policy => {
|
||||
if (pubkey && pubkey === policy.public_key) {
|
||||
node_policies = {
|
||||
...policy,
|
||||
node: { lnd, publicKey: policy.public_key },
|
||||
};
|
||||
} else {
|
||||
partner_node_policies = {
|
||||
...policy,
|
||||
node: { lnd, publicKey: policy.public_key },
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
return {
|
||||
...(channel as GetChannelType),
|
||||
node_policies,
|
||||
partner_node_policies,
|
||||
};
|
||||
};
|
55
server/schema/forwards/resolvers.ts
Normal file
55
server/schema/forwards/resolvers.ts
Normal file
@ -0,0 +1,55 @@
|
||||
import { subDays } from 'date-fns';
|
||||
import { to } from 'server/helpers/async';
|
||||
import { requestLimiter } from 'server/helpers/rateLimiter';
|
||||
import { ContextType } from 'server/types/apiTypes';
|
||||
import { GetForwardsType } from 'server/types/ln-service.types';
|
||||
import { getForwards as getLnForwards } from 'ln-service';
|
||||
import { sortBy } from 'lodash';
|
||||
|
||||
export const forwardsResolver = {
|
||||
Query: {
|
||||
getForwards: async (
|
||||
_: undefined,
|
||||
{ days }: { days: number },
|
||||
context: ContextType
|
||||
) => {
|
||||
await requestLimiter(context.ip, 'getForwardsPastDays');
|
||||
|
||||
const { lnd } = context;
|
||||
|
||||
const today = new Date();
|
||||
const startDate = subDays(today, days);
|
||||
|
||||
const forwardsList = await to<GetForwardsType>(
|
||||
getLnForwards({
|
||||
lnd,
|
||||
after: startDate,
|
||||
before: today,
|
||||
})
|
||||
);
|
||||
|
||||
let forwards = forwardsList.forwards;
|
||||
let next = forwardsList.next;
|
||||
|
||||
let finishedFetching = false;
|
||||
|
||||
if (!next || !forwards || forwards.length <= 0) {
|
||||
finishedFetching = true;
|
||||
}
|
||||
|
||||
while (!finishedFetching) {
|
||||
if (next) {
|
||||
const moreForwards = await to<GetForwardsType>(
|
||||
getLnForwards({ lnd, token: next })
|
||||
);
|
||||
forwards = [...forwards, ...moreForwards.forwards];
|
||||
next = moreForwards.next;
|
||||
} else {
|
||||
finishedFetching = true;
|
||||
}
|
||||
}
|
||||
|
||||
return sortBy(forwards, 'created_at').reverse();
|
||||
},
|
||||
},
|
||||
};
|
@ -44,6 +44,7 @@ import { lnMarketsResolvers } from './lnmarkets/resolvers';
|
||||
import { lnMarketsTypes } from './lnmarkets/types';
|
||||
import { boltzResolvers } from './boltz/resolvers';
|
||||
import { boltzTypes } from './boltz/types';
|
||||
import { forwardsResolver } from './forwards/resolvers';
|
||||
|
||||
const typeDefs = [
|
||||
generalTypes,
|
||||
@ -94,7 +95,8 @@ const resolvers = merge(
|
||||
tbaseResolvers,
|
||||
lnUrlResolvers,
|
||||
lnMarketsResolvers,
|
||||
boltzResolvers
|
||||
boltzResolvers,
|
||||
forwardsResolver
|
||||
);
|
||||
|
||||
export const schema = makeExecutableSchema({ typeDefs, resolvers });
|
||||
|
@ -1,11 +1,5 @@
|
||||
import {
|
||||
getPayments,
|
||||
getInvoices,
|
||||
getForwards as getLnForwards,
|
||||
getWalletInfo,
|
||||
getClosedChannels,
|
||||
} from 'ln-service';
|
||||
import { compareDesc, subDays } from 'date-fns';
|
||||
import { getPayments, getInvoices } from 'ln-service';
|
||||
import { compareDesc } from 'date-fns';
|
||||
import { sortBy } from 'underscore';
|
||||
import { ContextType } from 'server/types/apiTypes';
|
||||
import { requestLimiter } from 'server/helpers/rateLimiter';
|
||||
@ -15,12 +9,7 @@ import {
|
||||
GetPaymentsType,
|
||||
InvoiceType,
|
||||
PaymentType,
|
||||
GetForwardsType,
|
||||
GetWalletInfoType,
|
||||
GetClosedChannelsType,
|
||||
} from 'server/types/ln-service.types';
|
||||
import { logger } from 'server/helpers/logger';
|
||||
import { getNodeFromChannel } from './helpers';
|
||||
|
||||
type TransactionType = InvoiceType | PaymentType;
|
||||
type TransactionWithType = { isTypeOf: string } & TransactionType;
|
||||
@ -105,89 +94,10 @@ export const transactionResolvers = {
|
||||
resume,
|
||||
};
|
||||
},
|
||||
|
||||
getForwardsPastDays: async (
|
||||
_: undefined,
|
||||
{ days }: { days: number },
|
||||
context: ContextType
|
||||
) => {
|
||||
await requestLimiter(context.ip, 'getForwardsPastDays');
|
||||
|
||||
const { lnd } = context;
|
||||
|
||||
const today = new Date();
|
||||
const startDate = subDays(today, days);
|
||||
|
||||
const walletInfo = await to<GetWalletInfoType>(getWalletInfo({ lnd }));
|
||||
|
||||
const closedChannels = await to<GetClosedChannelsType>(
|
||||
getClosedChannels({ lnd })
|
||||
);
|
||||
|
||||
const forwardsList = await to<GetForwardsType>(
|
||||
getLnForwards({
|
||||
lnd,
|
||||
after: startDate,
|
||||
before: today,
|
||||
})
|
||||
);
|
||||
|
||||
let forwards = forwardsList.forwards;
|
||||
let next = forwardsList.next;
|
||||
|
||||
let finishedFetching = false;
|
||||
|
||||
if (!next || !forwards || forwards.length <= 0) {
|
||||
finishedFetching = true;
|
||||
}
|
||||
|
||||
while (!finishedFetching) {
|
||||
if (next) {
|
||||
const moreForwards = await to<GetForwardsType>(
|
||||
getLnForwards({ lnd, token: next })
|
||||
);
|
||||
forwards = [...forwards, ...moreForwards.forwards];
|
||||
next = moreForwards.next;
|
||||
} else {
|
||||
finishedFetching = true;
|
||||
}
|
||||
}
|
||||
|
||||
const final = forwards.map(f => ({
|
||||
...f,
|
||||
lnd,
|
||||
public_key: walletInfo.public_key,
|
||||
closed_channels: closedChannels.channels || [],
|
||||
}));
|
||||
|
||||
logger.debug(
|
||||
`Got a total of ${final.length} forwards for the past ${days} days`
|
||||
);
|
||||
|
||||
return sortBy(final, 'created_at').reverse();
|
||||
},
|
||||
},
|
||||
Transaction: {
|
||||
__resolveType(parent: TransactionWithType) {
|
||||
return parent.isTypeOf;
|
||||
},
|
||||
},
|
||||
Forward: {
|
||||
incoming_node(parent: any) {
|
||||
return getNodeFromChannel(
|
||||
parent.lnd,
|
||||
parent.incoming_channel,
|
||||
parent.public_key,
|
||||
parent.closed_channels
|
||||
);
|
||||
},
|
||||
outgoing_node(parent: any) {
|
||||
return getNodeFromChannel(
|
||||
parent.lnd,
|
||||
parent.outgoing_channel,
|
||||
parent.public_key,
|
||||
parent.closed_channels
|
||||
);
|
||||
},
|
||||
},
|
||||
};
|
||||
|
@ -9,8 +9,6 @@ export const transactionTypes = gql`
|
||||
mtokens: String!
|
||||
outgoing_channel: String!
|
||||
tokens: Int!
|
||||
incoming_node: ForwardNodeType
|
||||
outgoing_node: ForwardNodeType
|
||||
}
|
||||
|
||||
type ForwardNodeType {
|
||||
|
@ -51,6 +51,7 @@ export const queryTypes = gql`
|
||||
getTimeHealth: channelsTimeHealth
|
||||
getFeeHealth: channelsFeeHealth
|
||||
getChannelBalance: channelBalanceType
|
||||
getChannel(id: String!, pubkey: String): singleChannelType!
|
||||
getChannels(active: Boolean): [channelType]!
|
||||
getClosedChannels(type: String): [closedChannelType]
|
||||
getPendingChannels: [pendingChannelType]
|
||||
@ -62,7 +63,7 @@ export const queryTypes = gql`
|
||||
decodeRequest(request: String!): decodeType
|
||||
getWalletInfo: walletInfoType
|
||||
getResume(token: String): getResumeType
|
||||
getForwardsPastDays(days: Int!): [Forward]!
|
||||
getForwards(days: Int!): [Forward]!
|
||||
getBitcoinPrice(logger: Boolean, currency: String): String
|
||||
getBitcoinFees(logger: Boolean): bitcoinFeeType
|
||||
getForwardChannelsReport(time: String, order: String, type: String): String
|
||||
|
@ -3,6 +3,7 @@ import * as Types from '../../types';
|
||||
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {}
|
||||
export type AddPeerMutationVariables = Types.Exact<{
|
||||
url?: Types.Maybe<Types.Scalars['String']>;
|
||||
publicKey?: Types.Maybe<Types.Scalars['String']>;
|
||||
@ -50,7 +51,8 @@ export type AddPeerMutationFn = Apollo.MutationFunction<AddPeerMutation, AddPeer
|
||||
* });
|
||||
*/
|
||||
export function useAddPeerMutation(baseOptions?: Apollo.MutationHookOptions<AddPeerMutation, AddPeerMutationVariables>) {
|
||||
return Apollo.useMutation<AddPeerMutation, AddPeerMutationVariables>(AddPeerDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useMutation<AddPeerMutation, AddPeerMutationVariables>(AddPeerDocument, options);
|
||||
}
|
||||
export type AddPeerMutationHookResult = ReturnType<typeof useAddPeerMutation>;
|
||||
export type AddPeerMutationResult = Apollo.MutationResult<AddPeerMutation>;
|
||||
|
@ -3,6 +3,7 @@ import * as Types from '../../types';
|
||||
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {}
|
||||
export type BosPayMutationVariables = Types.Exact<{
|
||||
max_fee: Types.Scalars['Int'];
|
||||
max_paths: Types.Scalars['Int'];
|
||||
@ -53,7 +54,8 @@ export type BosPayMutationFn = Apollo.MutationFunction<BosPayMutation, BosPayMut
|
||||
* });
|
||||
*/
|
||||
export function useBosPayMutation(baseOptions?: Apollo.MutationHookOptions<BosPayMutation, BosPayMutationVariables>) {
|
||||
return Apollo.useMutation<BosPayMutation, BosPayMutationVariables>(BosPayDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useMutation<BosPayMutation, BosPayMutationVariables>(BosPayDocument, options);
|
||||
}
|
||||
export type BosPayMutationHookResult = ReturnType<typeof useBosPayMutation>;
|
||||
export type BosPayMutationResult = Apollo.MutationResult<BosPayMutation>;
|
||||
|
@ -3,6 +3,7 @@ import * as Types from '../../types';
|
||||
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {}
|
||||
export type BosRebalanceMutationVariables = Types.Exact<{
|
||||
avoid?: Types.Maybe<Array<Types.Maybe<Types.Scalars['String']>> | Types.Maybe<Types.Scalars['String']>>;
|
||||
in_through?: Types.Maybe<Types.Scalars['String']>;
|
||||
@ -100,7 +101,8 @@ export type BosRebalanceMutationFn = Apollo.MutationFunction<BosRebalanceMutatio
|
||||
* });
|
||||
*/
|
||||
export function useBosRebalanceMutation(baseOptions?: Apollo.MutationHookOptions<BosRebalanceMutation, BosRebalanceMutationVariables>) {
|
||||
return Apollo.useMutation<BosRebalanceMutation, BosRebalanceMutationVariables>(BosRebalanceDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useMutation<BosRebalanceMutation, BosRebalanceMutationVariables>(BosRebalanceDocument, options);
|
||||
}
|
||||
export type BosRebalanceMutationHookResult = ReturnType<typeof useBosRebalanceMutation>;
|
||||
export type BosRebalanceMutationResult = Apollo.MutationResult<BosRebalanceMutation>;
|
||||
|
@ -3,6 +3,7 @@ import * as Types from '../../types';
|
||||
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {}
|
||||
export type CircularRebalanceMutationVariables = Types.Exact<{
|
||||
route: Types.Scalars['String'];
|
||||
}>;
|
||||
@ -39,7 +40,8 @@ export type CircularRebalanceMutationFn = Apollo.MutationFunction<CircularRebala
|
||||
* });
|
||||
*/
|
||||
export function useCircularRebalanceMutation(baseOptions?: Apollo.MutationHookOptions<CircularRebalanceMutation, CircularRebalanceMutationVariables>) {
|
||||
return Apollo.useMutation<CircularRebalanceMutation, CircularRebalanceMutationVariables>(CircularRebalanceDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useMutation<CircularRebalanceMutation, CircularRebalanceMutationVariables>(CircularRebalanceDocument, options);
|
||||
}
|
||||
export type CircularRebalanceMutationHookResult = ReturnType<typeof useCircularRebalanceMutation>;
|
||||
export type CircularRebalanceMutationResult = Apollo.MutationResult<CircularRebalanceMutation>;
|
||||
|
@ -3,6 +3,7 @@ import * as Types from '../../types';
|
||||
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {}
|
||||
export type ClaimBoltzTransactionMutationVariables = Types.Exact<{
|
||||
redeem: Types.Scalars['String'];
|
||||
transaction: Types.Scalars['String'];
|
||||
@ -56,7 +57,8 @@ export type ClaimBoltzTransactionMutationFn = Apollo.MutationFunction<ClaimBoltz
|
||||
* });
|
||||
*/
|
||||
export function useClaimBoltzTransactionMutation(baseOptions?: Apollo.MutationHookOptions<ClaimBoltzTransactionMutation, ClaimBoltzTransactionMutationVariables>) {
|
||||
return Apollo.useMutation<ClaimBoltzTransactionMutation, ClaimBoltzTransactionMutationVariables>(ClaimBoltzTransactionDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useMutation<ClaimBoltzTransactionMutation, ClaimBoltzTransactionMutationVariables>(ClaimBoltzTransactionDocument, options);
|
||||
}
|
||||
export type ClaimBoltzTransactionMutationHookResult = ReturnType<typeof useClaimBoltzTransactionMutation>;
|
||||
export type ClaimBoltzTransactionMutationResult = Apollo.MutationResult<ClaimBoltzTransactionMutation>;
|
||||
|
@ -3,6 +3,7 @@ import * as Types from '../../types';
|
||||
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {}
|
||||
export type CloseChannelMutationVariables = Types.Exact<{
|
||||
id: Types.Scalars['String'];
|
||||
forceClose?: Types.Maybe<Types.Scalars['Boolean']>;
|
||||
@ -56,7 +57,8 @@ export type CloseChannelMutationFn = Apollo.MutationFunction<CloseChannelMutatio
|
||||
* });
|
||||
*/
|
||||
export function useCloseChannelMutation(baseOptions?: Apollo.MutationHookOptions<CloseChannelMutation, CloseChannelMutationVariables>) {
|
||||
return Apollo.useMutation<CloseChannelMutation, CloseChannelMutationVariables>(CloseChannelDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useMutation<CloseChannelMutation, CloseChannelMutationVariables>(CloseChannelDocument, options);
|
||||
}
|
||||
export type CloseChannelMutationHookResult = ReturnType<typeof useCloseChannelMutation>;
|
||||
export type CloseChannelMutationResult = Apollo.MutationResult<CloseChannelMutation>;
|
||||
|
@ -3,6 +3,7 @@ import * as Types from '../../types';
|
||||
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {}
|
||||
export type CreateAddressMutationVariables = Types.Exact<{
|
||||
nested?: Types.Maybe<Types.Scalars['Boolean']>;
|
||||
}>;
|
||||
@ -39,7 +40,8 @@ export type CreateAddressMutationFn = Apollo.MutationFunction<CreateAddressMutat
|
||||
* });
|
||||
*/
|
||||
export function useCreateAddressMutation(baseOptions?: Apollo.MutationHookOptions<CreateAddressMutation, CreateAddressMutationVariables>) {
|
||||
return Apollo.useMutation<CreateAddressMutation, CreateAddressMutationVariables>(CreateAddressDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useMutation<CreateAddressMutation, CreateAddressMutationVariables>(CreateAddressDocument, options);
|
||||
}
|
||||
export type CreateAddressMutationHookResult = ReturnType<typeof useCreateAddressMutation>;
|
||||
export type CreateAddressMutationResult = Apollo.MutationResult<CreateAddressMutation>;
|
||||
|
@ -3,6 +3,7 @@ import * as Types from '../../types';
|
||||
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {}
|
||||
export type CreateBaseInvoiceMutationVariables = Types.Exact<{
|
||||
amount: Types.Scalars['Int'];
|
||||
}>;
|
||||
@ -45,7 +46,8 @@ export type CreateBaseInvoiceMutationFn = Apollo.MutationFunction<CreateBaseInvo
|
||||
* });
|
||||
*/
|
||||
export function useCreateBaseInvoiceMutation(baseOptions?: Apollo.MutationHookOptions<CreateBaseInvoiceMutation, CreateBaseInvoiceMutationVariables>) {
|
||||
return Apollo.useMutation<CreateBaseInvoiceMutation, CreateBaseInvoiceMutationVariables>(CreateBaseInvoiceDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useMutation<CreateBaseInvoiceMutation, CreateBaseInvoiceMutationVariables>(CreateBaseInvoiceDocument, options);
|
||||
}
|
||||
export type CreateBaseInvoiceMutationHookResult = ReturnType<typeof useCreateBaseInvoiceMutation>;
|
||||
export type CreateBaseInvoiceMutationResult = Apollo.MutationResult<CreateBaseInvoiceMutation>;
|
||||
|
@ -3,6 +3,7 @@ import * as Types from '../../types';
|
||||
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {}
|
||||
export type CreateBaseTokenMutationVariables = Types.Exact<{
|
||||
id: Types.Scalars['String'];
|
||||
}>;
|
||||
@ -39,7 +40,8 @@ export type CreateBaseTokenMutationFn = Apollo.MutationFunction<CreateBaseTokenM
|
||||
* });
|
||||
*/
|
||||
export function useCreateBaseTokenMutation(baseOptions?: Apollo.MutationHookOptions<CreateBaseTokenMutation, CreateBaseTokenMutationVariables>) {
|
||||
return Apollo.useMutation<CreateBaseTokenMutation, CreateBaseTokenMutationVariables>(CreateBaseTokenDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useMutation<CreateBaseTokenMutation, CreateBaseTokenMutationVariables>(CreateBaseTokenDocument, options);
|
||||
}
|
||||
export type CreateBaseTokenMutationHookResult = ReturnType<typeof useCreateBaseTokenMutation>;
|
||||
export type CreateBaseTokenMutationResult = Apollo.MutationResult<CreateBaseTokenMutation>;
|
||||
|
@ -3,6 +3,7 @@ import * as Types from '../../types';
|
||||
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {}
|
||||
export type CreateBaseTokenInvoiceMutationVariables = Types.Exact<{ [key: string]: never; }>;
|
||||
|
||||
|
||||
@ -42,7 +43,8 @@ export type CreateBaseTokenInvoiceMutationFn = Apollo.MutationFunction<CreateBas
|
||||
* });
|
||||
*/
|
||||
export function useCreateBaseTokenInvoiceMutation(baseOptions?: Apollo.MutationHookOptions<CreateBaseTokenInvoiceMutation, CreateBaseTokenInvoiceMutationVariables>) {
|
||||
return Apollo.useMutation<CreateBaseTokenInvoiceMutation, CreateBaseTokenInvoiceMutationVariables>(CreateBaseTokenInvoiceDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useMutation<CreateBaseTokenInvoiceMutation, CreateBaseTokenInvoiceMutationVariables>(CreateBaseTokenInvoiceDocument, options);
|
||||
}
|
||||
export type CreateBaseTokenInvoiceMutationHookResult = ReturnType<typeof useCreateBaseTokenInvoiceMutation>;
|
||||
export type CreateBaseTokenInvoiceMutationResult = Apollo.MutationResult<CreateBaseTokenInvoiceMutation>;
|
||||
|
@ -3,6 +3,7 @@ import * as Types from '../../types';
|
||||
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {}
|
||||
export type CreateBoltzReverseSwapMutationVariables = Types.Exact<{
|
||||
amount: Types.Scalars['Int'];
|
||||
address?: Types.Maybe<Types.Scalars['String']>;
|
||||
@ -81,7 +82,8 @@ export type CreateBoltzReverseSwapMutationFn = Apollo.MutationFunction<CreateBol
|
||||
* });
|
||||
*/
|
||||
export function useCreateBoltzReverseSwapMutation(baseOptions?: Apollo.MutationHookOptions<CreateBoltzReverseSwapMutation, CreateBoltzReverseSwapMutationVariables>) {
|
||||
return Apollo.useMutation<CreateBoltzReverseSwapMutation, CreateBoltzReverseSwapMutationVariables>(CreateBoltzReverseSwapDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useMutation<CreateBoltzReverseSwapMutation, CreateBoltzReverseSwapMutationVariables>(CreateBoltzReverseSwapDocument, options);
|
||||
}
|
||||
export type CreateBoltzReverseSwapMutationHookResult = ReturnType<typeof useCreateBoltzReverseSwapMutation>;
|
||||
export type CreateBoltzReverseSwapMutationResult = Apollo.MutationResult<CreateBoltzReverseSwapMutation>;
|
||||
|
@ -3,6 +3,7 @@ import * as Types from '../../types';
|
||||
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {}
|
||||
export type CreateInvoiceMutationVariables = Types.Exact<{
|
||||
amount: Types.Scalars['Int'];
|
||||
description?: Types.Maybe<Types.Scalars['String']>;
|
||||
@ -53,7 +54,8 @@ export type CreateInvoiceMutationFn = Apollo.MutationFunction<CreateInvoiceMutat
|
||||
* });
|
||||
*/
|
||||
export function useCreateInvoiceMutation(baseOptions?: Apollo.MutationHookOptions<CreateInvoiceMutation, CreateInvoiceMutationVariables>) {
|
||||
return Apollo.useMutation<CreateInvoiceMutation, CreateInvoiceMutationVariables>(CreateInvoiceDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useMutation<CreateInvoiceMutation, CreateInvoiceMutationVariables>(CreateInvoiceDocument, options);
|
||||
}
|
||||
export type CreateInvoiceMutationHookResult = ReturnType<typeof useCreateInvoiceMutation>;
|
||||
export type CreateInvoiceMutationResult = Apollo.MutationResult<CreateInvoiceMutation>;
|
||||
|
@ -3,6 +3,7 @@ import * as Types from '../../types';
|
||||
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {}
|
||||
export type CreateMacaroonMutationVariables = Types.Exact<{
|
||||
permissions: Types.PermissionsType;
|
||||
}>;
|
||||
@ -39,7 +40,8 @@ export type CreateMacaroonMutationFn = Apollo.MutationFunction<CreateMacaroonMut
|
||||
* });
|
||||
*/
|
||||
export function useCreateMacaroonMutation(baseOptions?: Apollo.MutationHookOptions<CreateMacaroonMutation, CreateMacaroonMutationVariables>) {
|
||||
return Apollo.useMutation<CreateMacaroonMutation, CreateMacaroonMutationVariables>(CreateMacaroonDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useMutation<CreateMacaroonMutation, CreateMacaroonMutationVariables>(CreateMacaroonDocument, options);
|
||||
}
|
||||
export type CreateMacaroonMutationHookResult = ReturnType<typeof useCreateMacaroonMutation>;
|
||||
export type CreateMacaroonMutationResult = Apollo.MutationResult<CreateMacaroonMutation>;
|
||||
|
@ -3,6 +3,7 @@ import * as Types from '../../types';
|
||||
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {}
|
||||
export type CreateThunderPointsMutationVariables = Types.Exact<{
|
||||
id: Types.Scalars['String'];
|
||||
alias: Types.Scalars['String'];
|
||||
@ -50,7 +51,8 @@ export type CreateThunderPointsMutationFn = Apollo.MutationFunction<CreateThunde
|
||||
* });
|
||||
*/
|
||||
export function useCreateThunderPointsMutation(baseOptions?: Apollo.MutationHookOptions<CreateThunderPointsMutation, CreateThunderPointsMutationVariables>) {
|
||||
return Apollo.useMutation<CreateThunderPointsMutation, CreateThunderPointsMutationVariables>(CreateThunderPointsDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useMutation<CreateThunderPointsMutation, CreateThunderPointsMutationVariables>(CreateThunderPointsDocument, options);
|
||||
}
|
||||
export type CreateThunderPointsMutationHookResult = ReturnType<typeof useCreateThunderPointsMutation>;
|
||||
export type CreateThunderPointsMutationResult = Apollo.MutationResult<CreateThunderPointsMutation>;
|
||||
|
@ -3,6 +3,7 @@ import * as Types from '../../types';
|
||||
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {}
|
||||
export type DeleteBaseTokenMutationVariables = Types.Exact<{ [key: string]: never; }>;
|
||||
|
||||
|
||||
@ -36,7 +37,8 @@ export type DeleteBaseTokenMutationFn = Apollo.MutationFunction<DeleteBaseTokenM
|
||||
* });
|
||||
*/
|
||||
export function useDeleteBaseTokenMutation(baseOptions?: Apollo.MutationHookOptions<DeleteBaseTokenMutation, DeleteBaseTokenMutationVariables>) {
|
||||
return Apollo.useMutation<DeleteBaseTokenMutation, DeleteBaseTokenMutationVariables>(DeleteBaseTokenDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useMutation<DeleteBaseTokenMutation, DeleteBaseTokenMutationVariables>(DeleteBaseTokenDocument, options);
|
||||
}
|
||||
export type DeleteBaseTokenMutationHookResult = ReturnType<typeof useDeleteBaseTokenMutation>;
|
||||
export type DeleteBaseTokenMutationResult = Apollo.MutationResult<DeleteBaseTokenMutation>;
|
||||
|
@ -3,6 +3,7 @@ import * as Types from '../../types';
|
||||
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {}
|
||||
export type GetAuthTokenMutationVariables = Types.Exact<{
|
||||
cookie?: Types.Maybe<Types.Scalars['String']>;
|
||||
}>;
|
||||
@ -39,7 +40,8 @@ export type GetAuthTokenMutationFn = Apollo.MutationFunction<GetAuthTokenMutatio
|
||||
* });
|
||||
*/
|
||||
export function useGetAuthTokenMutation(baseOptions?: Apollo.MutationHookOptions<GetAuthTokenMutation, GetAuthTokenMutationVariables>) {
|
||||
return Apollo.useMutation<GetAuthTokenMutation, GetAuthTokenMutationVariables>(GetAuthTokenDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useMutation<GetAuthTokenMutation, GetAuthTokenMutationVariables>(GetAuthTokenDocument, options);
|
||||
}
|
||||
export type GetAuthTokenMutationHookResult = ReturnType<typeof useGetAuthTokenMutation>;
|
||||
export type GetAuthTokenMutationResult = Apollo.MutationResult<GetAuthTokenMutation>;
|
||||
|
@ -3,6 +3,7 @@ import * as Types from '../../types';
|
||||
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {}
|
||||
export type GetSessionTokenMutationVariables = Types.Exact<{
|
||||
id: Types.Scalars['String'];
|
||||
password: Types.Scalars['String'];
|
||||
@ -41,7 +42,8 @@ export type GetSessionTokenMutationFn = Apollo.MutationFunction<GetSessionTokenM
|
||||
* });
|
||||
*/
|
||||
export function useGetSessionTokenMutation(baseOptions?: Apollo.MutationHookOptions<GetSessionTokenMutation, GetSessionTokenMutationVariables>) {
|
||||
return Apollo.useMutation<GetSessionTokenMutation, GetSessionTokenMutationVariables>(GetSessionTokenDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useMutation<GetSessionTokenMutation, GetSessionTokenMutationVariables>(GetSessionTokenDocument, options);
|
||||
}
|
||||
export type GetSessionTokenMutationHookResult = ReturnType<typeof useGetSessionTokenMutation>;
|
||||
export type GetSessionTokenMutationResult = Apollo.MutationResult<GetSessionTokenMutation>;
|
||||
|
@ -3,6 +3,7 @@ import * as Types from '../../types';
|
||||
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {}
|
||||
export type KeysendMutationVariables = Types.Exact<{
|
||||
destination: Types.Scalars['String'];
|
||||
tokens: Types.Scalars['Int'];
|
||||
@ -46,7 +47,8 @@ export type KeysendMutationFn = Apollo.MutationFunction<KeysendMutation, Keysend
|
||||
* });
|
||||
*/
|
||||
export function useKeysendMutation(baseOptions?: Apollo.MutationHookOptions<KeysendMutation, KeysendMutationVariables>) {
|
||||
return Apollo.useMutation<KeysendMutation, KeysendMutationVariables>(KeysendDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useMutation<KeysendMutation, KeysendMutationVariables>(KeysendDocument, options);
|
||||
}
|
||||
export type KeysendMutationHookResult = ReturnType<typeof useKeysendMutation>;
|
||||
export type KeysendMutationResult = Apollo.MutationResult<KeysendMutation>;
|
||||
|
@ -3,6 +3,7 @@ import * as Types from '../../types';
|
||||
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {}
|
||||
export type LnMarketsLoginMutationVariables = Types.Exact<{ [key: string]: never; }>;
|
||||
|
||||
|
||||
@ -70,7 +71,8 @@ export type LnMarketsLoginMutationFn = Apollo.MutationFunction<LnMarketsLoginMut
|
||||
* });
|
||||
*/
|
||||
export function useLnMarketsLoginMutation(baseOptions?: Apollo.MutationHookOptions<LnMarketsLoginMutation, LnMarketsLoginMutationVariables>) {
|
||||
return Apollo.useMutation<LnMarketsLoginMutation, LnMarketsLoginMutationVariables>(LnMarketsLoginDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useMutation<LnMarketsLoginMutation, LnMarketsLoginMutationVariables>(LnMarketsLoginDocument, options);
|
||||
}
|
||||
export type LnMarketsLoginMutationHookResult = ReturnType<typeof useLnMarketsLoginMutation>;
|
||||
export type LnMarketsLoginMutationResult = Apollo.MutationResult<LnMarketsLoginMutation>;
|
||||
@ -100,7 +102,8 @@ export type LnMarketsWithdrawMutationFn = Apollo.MutationFunction<LnMarketsWithd
|
||||
* });
|
||||
*/
|
||||
export function useLnMarketsWithdrawMutation(baseOptions?: Apollo.MutationHookOptions<LnMarketsWithdrawMutation, LnMarketsWithdrawMutationVariables>) {
|
||||
return Apollo.useMutation<LnMarketsWithdrawMutation, LnMarketsWithdrawMutationVariables>(LnMarketsWithdrawDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useMutation<LnMarketsWithdrawMutation, LnMarketsWithdrawMutationVariables>(LnMarketsWithdrawDocument, options);
|
||||
}
|
||||
export type LnMarketsWithdrawMutationHookResult = ReturnType<typeof useLnMarketsWithdrawMutation>;
|
||||
export type LnMarketsWithdrawMutationResult = Apollo.MutationResult<LnMarketsWithdrawMutation>;
|
||||
@ -130,7 +133,8 @@ export type LnMarketsDepositMutationFn = Apollo.MutationFunction<LnMarketsDeposi
|
||||
* });
|
||||
*/
|
||||
export function useLnMarketsDepositMutation(baseOptions?: Apollo.MutationHookOptions<LnMarketsDepositMutation, LnMarketsDepositMutationVariables>) {
|
||||
return Apollo.useMutation<LnMarketsDepositMutation, LnMarketsDepositMutationVariables>(LnMarketsDepositDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useMutation<LnMarketsDepositMutation, LnMarketsDepositMutationVariables>(LnMarketsDepositDocument, options);
|
||||
}
|
||||
export type LnMarketsDepositMutationHookResult = ReturnType<typeof useLnMarketsDepositMutation>;
|
||||
export type LnMarketsDepositMutationResult = Apollo.MutationResult<LnMarketsDepositMutation>;
|
||||
@ -159,7 +163,8 @@ export type LnMarketsLogoutMutationFn = Apollo.MutationFunction<LnMarketsLogoutM
|
||||
* });
|
||||
*/
|
||||
export function useLnMarketsLogoutMutation(baseOptions?: Apollo.MutationHookOptions<LnMarketsLogoutMutation, LnMarketsLogoutMutationVariables>) {
|
||||
return Apollo.useMutation<LnMarketsLogoutMutation, LnMarketsLogoutMutationVariables>(LnMarketsLogoutDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useMutation<LnMarketsLogoutMutation, LnMarketsLogoutMutationVariables>(LnMarketsLogoutDocument, options);
|
||||
}
|
||||
export type LnMarketsLogoutMutationHookResult = ReturnType<typeof useLnMarketsLogoutMutation>;
|
||||
export type LnMarketsLogoutMutationResult = Apollo.MutationResult<LnMarketsLogoutMutation>;
|
||||
|
@ -3,6 +3,7 @@ import * as Types from '../../types';
|
||||
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {}
|
||||
export type FetchLnUrlMutationVariables = Types.Exact<{
|
||||
url: Types.Scalars['String'];
|
||||
}>;
|
||||
@ -103,7 +104,8 @@ export type FetchLnUrlMutationFn = Apollo.MutationFunction<FetchLnUrlMutation, F
|
||||
* });
|
||||
*/
|
||||
export function useFetchLnUrlMutation(baseOptions?: Apollo.MutationHookOptions<FetchLnUrlMutation, FetchLnUrlMutationVariables>) {
|
||||
return Apollo.useMutation<FetchLnUrlMutation, FetchLnUrlMutationVariables>(FetchLnUrlDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useMutation<FetchLnUrlMutation, FetchLnUrlMutationVariables>(FetchLnUrlDocument, options);
|
||||
}
|
||||
export type FetchLnUrlMutationHookResult = ReturnType<typeof useFetchLnUrlMutation>;
|
||||
export type FetchLnUrlMutationResult = Apollo.MutationResult<FetchLnUrlMutation>;
|
||||
@ -136,7 +138,8 @@ export type AuthLnUrlMutationFn = Apollo.MutationFunction<AuthLnUrlMutation, Aut
|
||||
* });
|
||||
*/
|
||||
export function useAuthLnUrlMutation(baseOptions?: Apollo.MutationHookOptions<AuthLnUrlMutation, AuthLnUrlMutationVariables>) {
|
||||
return Apollo.useMutation<AuthLnUrlMutation, AuthLnUrlMutationVariables>(AuthLnUrlDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useMutation<AuthLnUrlMutation, AuthLnUrlMutationVariables>(AuthLnUrlDocument, options);
|
||||
}
|
||||
export type AuthLnUrlMutationHookResult = ReturnType<typeof useAuthLnUrlMutation>;
|
||||
export type AuthLnUrlMutationResult = Apollo.MutationResult<AuthLnUrlMutation>;
|
||||
@ -175,7 +178,8 @@ export type PayLnUrlMutationFn = Apollo.MutationFunction<PayLnUrlMutation, PayLn
|
||||
* });
|
||||
*/
|
||||
export function usePayLnUrlMutation(baseOptions?: Apollo.MutationHookOptions<PayLnUrlMutation, PayLnUrlMutationVariables>) {
|
||||
return Apollo.useMutation<PayLnUrlMutation, PayLnUrlMutationVariables>(PayLnUrlDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useMutation<PayLnUrlMutation, PayLnUrlMutationVariables>(PayLnUrlDocument, options);
|
||||
}
|
||||
export type PayLnUrlMutationHookResult = ReturnType<typeof usePayLnUrlMutation>;
|
||||
export type PayLnUrlMutationResult = Apollo.MutationResult<PayLnUrlMutation>;
|
||||
@ -213,7 +217,8 @@ export type WithdrawLnUrlMutationFn = Apollo.MutationFunction<WithdrawLnUrlMutat
|
||||
* });
|
||||
*/
|
||||
export function useWithdrawLnUrlMutation(baseOptions?: Apollo.MutationHookOptions<WithdrawLnUrlMutation, WithdrawLnUrlMutationVariables>) {
|
||||
return Apollo.useMutation<WithdrawLnUrlMutation, WithdrawLnUrlMutationVariables>(WithdrawLnUrlDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useMutation<WithdrawLnUrlMutation, WithdrawLnUrlMutationVariables>(WithdrawLnUrlDocument, options);
|
||||
}
|
||||
export type WithdrawLnUrlMutationHookResult = ReturnType<typeof useWithdrawLnUrlMutation>;
|
||||
export type WithdrawLnUrlMutationResult = Apollo.MutationResult<WithdrawLnUrlMutation>;
|
||||
|
@ -3,6 +3,7 @@ import * as Types from '../../types';
|
||||
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {}
|
||||
export type LogoutMutationVariables = Types.Exact<{ [key: string]: never; }>;
|
||||
|
||||
|
||||
@ -36,7 +37,8 @@ export type LogoutMutationFn = Apollo.MutationFunction<LogoutMutation, LogoutMut
|
||||
* });
|
||||
*/
|
||||
export function useLogoutMutation(baseOptions?: Apollo.MutationHookOptions<LogoutMutation, LogoutMutationVariables>) {
|
||||
return Apollo.useMutation<LogoutMutation, LogoutMutationVariables>(LogoutDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useMutation<LogoutMutation, LogoutMutationVariables>(LogoutDocument, options);
|
||||
}
|
||||
export type LogoutMutationHookResult = ReturnType<typeof useLogoutMutation>;
|
||||
export type LogoutMutationResult = Apollo.MutationResult<LogoutMutation>;
|
||||
|
@ -3,6 +3,7 @@ import * as Types from '../../types';
|
||||
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {}
|
||||
export type OpenChannelMutationVariables = Types.Exact<{
|
||||
amount: Types.Scalars['Int'];
|
||||
partnerPublicKey: Types.Scalars['String'];
|
||||
@ -59,7 +60,8 @@ export type OpenChannelMutationFn = Apollo.MutationFunction<OpenChannelMutation,
|
||||
* });
|
||||
*/
|
||||
export function useOpenChannelMutation(baseOptions?: Apollo.MutationHookOptions<OpenChannelMutation, OpenChannelMutationVariables>) {
|
||||
return Apollo.useMutation<OpenChannelMutation, OpenChannelMutationVariables>(OpenChannelDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useMutation<OpenChannelMutation, OpenChannelMutationVariables>(OpenChannelDocument, options);
|
||||
}
|
||||
export type OpenChannelMutationHookResult = ReturnType<typeof useOpenChannelMutation>;
|
||||
export type OpenChannelMutationResult = Apollo.MutationResult<OpenChannelMutation>;
|
||||
|
@ -3,6 +3,7 @@ import * as Types from '../../types';
|
||||
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {}
|
||||
export type PayViaRouteMutationVariables = Types.Exact<{
|
||||
route: Types.Scalars['String'];
|
||||
id: Types.Scalars['String'];
|
||||
@ -41,7 +42,8 @@ export type PayViaRouteMutationFn = Apollo.MutationFunction<PayViaRouteMutation,
|
||||
* });
|
||||
*/
|
||||
export function usePayViaRouteMutation(baseOptions?: Apollo.MutationHookOptions<PayViaRouteMutation, PayViaRouteMutationVariables>) {
|
||||
return Apollo.useMutation<PayViaRouteMutation, PayViaRouteMutationVariables>(PayViaRouteDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useMutation<PayViaRouteMutation, PayViaRouteMutationVariables>(PayViaRouteDocument, options);
|
||||
}
|
||||
export type PayViaRouteMutationHookResult = ReturnType<typeof usePayViaRouteMutation>;
|
||||
export type PayViaRouteMutationResult = Apollo.MutationResult<PayViaRouteMutation>;
|
||||
|
@ -3,6 +3,7 @@ import * as Types from '../../types';
|
||||
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {}
|
||||
export type RemovePeerMutationVariables = Types.Exact<{
|
||||
publicKey: Types.Scalars['String'];
|
||||
}>;
|
||||
@ -39,7 +40,8 @@ export type RemovePeerMutationFn = Apollo.MutationFunction<RemovePeerMutation, R
|
||||
* });
|
||||
*/
|
||||
export function useRemovePeerMutation(baseOptions?: Apollo.MutationHookOptions<RemovePeerMutation, RemovePeerMutationVariables>) {
|
||||
return Apollo.useMutation<RemovePeerMutation, RemovePeerMutationVariables>(RemovePeerDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useMutation<RemovePeerMutation, RemovePeerMutationVariables>(RemovePeerDocument, options);
|
||||
}
|
||||
export type RemovePeerMutationHookResult = ReturnType<typeof useRemovePeerMutation>;
|
||||
export type RemovePeerMutationResult = Apollo.MutationResult<RemovePeerMutation>;
|
||||
|
@ -3,6 +3,7 @@ import * as Types from '../../types';
|
||||
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {}
|
||||
export type SendMessageMutationVariables = Types.Exact<{
|
||||
publicKey: Types.Scalars['String'];
|
||||
message: Types.Scalars['String'];
|
||||
@ -53,7 +54,8 @@ export type SendMessageMutationFn = Apollo.MutationFunction<SendMessageMutation,
|
||||
* });
|
||||
*/
|
||||
export function useSendMessageMutation(baseOptions?: Apollo.MutationHookOptions<SendMessageMutation, SendMessageMutationVariables>) {
|
||||
return Apollo.useMutation<SendMessageMutation, SendMessageMutationVariables>(SendMessageDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useMutation<SendMessageMutation, SendMessageMutationVariables>(SendMessageDocument, options);
|
||||
}
|
||||
export type SendMessageMutationHookResult = ReturnType<typeof useSendMessageMutation>;
|
||||
export type SendMessageMutationResult = Apollo.MutationResult<SendMessageMutation>;
|
||||
|
@ -3,6 +3,7 @@ import * as Types from '../../types';
|
||||
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {}
|
||||
export type PayAddressMutationVariables = Types.Exact<{
|
||||
address: Types.Scalars['String'];
|
||||
tokens?: Types.Maybe<Types.Scalars['Int']>;
|
||||
@ -62,7 +63,8 @@ export type PayAddressMutationFn = Apollo.MutationFunction<PayAddressMutation, P
|
||||
* });
|
||||
*/
|
||||
export function usePayAddressMutation(baseOptions?: Apollo.MutationHookOptions<PayAddressMutation, PayAddressMutationVariables>) {
|
||||
return Apollo.useMutation<PayAddressMutation, PayAddressMutationVariables>(PayAddressDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useMutation<PayAddressMutation, PayAddressMutationVariables>(PayAddressDocument, options);
|
||||
}
|
||||
export type PayAddressMutationHookResult = ReturnType<typeof usePayAddressMutation>;
|
||||
export type PayAddressMutationResult = Apollo.MutationResult<PayAddressMutation>;
|
||||
|
@ -3,6 +3,7 @@ import * as Types from '../../types';
|
||||
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {}
|
||||
export type UpdateFeesMutationVariables = Types.Exact<{
|
||||
transaction_id?: Types.Maybe<Types.Scalars['String']>;
|
||||
transaction_vout?: Types.Maybe<Types.Scalars['Int']>;
|
||||
@ -59,7 +60,8 @@ export type UpdateFeesMutationFn = Apollo.MutationFunction<UpdateFeesMutation, U
|
||||
* });
|
||||
*/
|
||||
export function useUpdateFeesMutation(baseOptions?: Apollo.MutationHookOptions<UpdateFeesMutation, UpdateFeesMutationVariables>) {
|
||||
return Apollo.useMutation<UpdateFeesMutation, UpdateFeesMutationVariables>(UpdateFeesDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useMutation<UpdateFeesMutation, UpdateFeesMutationVariables>(UpdateFeesDocument, options);
|
||||
}
|
||||
export type UpdateFeesMutationHookResult = ReturnType<typeof useUpdateFeesMutation>;
|
||||
export type UpdateFeesMutationResult = Apollo.MutationResult<UpdateFeesMutation>;
|
||||
|
@ -3,6 +3,7 @@ import * as Types from '../../types';
|
||||
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {}
|
||||
export type UpdateMultipleFeesMutationVariables = Types.Exact<{
|
||||
channels: Array<Types.ChannelDetailInput> | Types.ChannelDetailInput;
|
||||
}>;
|
||||
@ -39,7 +40,8 @@ export type UpdateMultipleFeesMutationFn = Apollo.MutationFunction<UpdateMultipl
|
||||
* });
|
||||
*/
|
||||
export function useUpdateMultipleFeesMutation(baseOptions?: Apollo.MutationHookOptions<UpdateMultipleFeesMutation, UpdateMultipleFeesMutationVariables>) {
|
||||
return Apollo.useMutation<UpdateMultipleFeesMutation, UpdateMultipleFeesMutationVariables>(UpdateMultipleFeesDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useMutation<UpdateMultipleFeesMutation, UpdateMultipleFeesMutationVariables>(UpdateMultipleFeesDocument, options);
|
||||
}
|
||||
export type UpdateMultipleFeesMutationHookResult = ReturnType<typeof useUpdateMultipleFeesMutation>;
|
||||
export type UpdateMultipleFeesMutationResult = Apollo.MutationResult<UpdateMultipleFeesMutation>;
|
||||
|
@ -3,6 +3,7 @@ import * as Types from '../../types';
|
||||
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {}
|
||||
export type GetCanAdminQueryVariables = Types.Exact<{ [key: string]: never; }>;
|
||||
|
||||
|
||||
@ -34,10 +35,12 @@ export const GetCanAdminDocument = gql`
|
||||
* });
|
||||
*/
|
||||
export function useGetCanAdminQuery(baseOptions?: Apollo.QueryHookOptions<GetCanAdminQuery, GetCanAdminQueryVariables>) {
|
||||
return Apollo.useQuery<GetCanAdminQuery, GetCanAdminQueryVariables>(GetCanAdminDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useQuery<GetCanAdminQuery, GetCanAdminQueryVariables>(GetCanAdminDocument, options);
|
||||
}
|
||||
export function useGetCanAdminLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetCanAdminQuery, GetCanAdminQueryVariables>) {
|
||||
return Apollo.useLazyQuery<GetCanAdminQuery, GetCanAdminQueryVariables>(GetCanAdminDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useLazyQuery<GetCanAdminQuery, GetCanAdminQueryVariables>(GetCanAdminDocument, options);
|
||||
}
|
||||
export type GetCanAdminQueryHookResult = ReturnType<typeof useGetCanAdminQuery>;
|
||||
export type GetCanAdminLazyQueryHookResult = ReturnType<typeof useGetCanAdminLazyQuery>;
|
||||
|
@ -3,6 +3,7 @@ import * as Types from '../../types';
|
||||
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {}
|
||||
export type DecodeRequestQueryVariables = Types.Exact<{
|
||||
request: Types.Scalars['String'];
|
||||
}>;
|
||||
@ -115,10 +116,12 @@ export const DecodeRequestDocument = gql`
|
||||
* });
|
||||
*/
|
||||
export function useDecodeRequestQuery(baseOptions: Apollo.QueryHookOptions<DecodeRequestQuery, DecodeRequestQueryVariables>) {
|
||||
return Apollo.useQuery<DecodeRequestQuery, DecodeRequestQueryVariables>(DecodeRequestDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useQuery<DecodeRequestQuery, DecodeRequestQueryVariables>(DecodeRequestDocument, options);
|
||||
}
|
||||
export function useDecodeRequestLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<DecodeRequestQuery, DecodeRequestQueryVariables>) {
|
||||
return Apollo.useLazyQuery<DecodeRequestQuery, DecodeRequestQueryVariables>(DecodeRequestDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useLazyQuery<DecodeRequestQuery, DecodeRequestQueryVariables>(DecodeRequestDocument, options);
|
||||
}
|
||||
export type DecodeRequestQueryHookResult = ReturnType<typeof useDecodeRequestQuery>;
|
||||
export type DecodeRequestLazyQueryHookResult = ReturnType<typeof useDecodeRequestLazyQuery>;
|
||||
|
@ -3,6 +3,7 @@ import * as Types from '../../types';
|
||||
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {}
|
||||
export type GetAccountQueryVariables = Types.Exact<{ [key: string]: never; }>;
|
||||
|
||||
|
||||
@ -42,10 +43,12 @@ export const GetAccountDocument = gql`
|
||||
* });
|
||||
*/
|
||||
export function useGetAccountQuery(baseOptions?: Apollo.QueryHookOptions<GetAccountQuery, GetAccountQueryVariables>) {
|
||||
return Apollo.useQuery<GetAccountQuery, GetAccountQueryVariables>(GetAccountDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useQuery<GetAccountQuery, GetAccountQueryVariables>(GetAccountDocument, options);
|
||||
}
|
||||
export function useGetAccountLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetAccountQuery, GetAccountQueryVariables>) {
|
||||
return Apollo.useLazyQuery<GetAccountQuery, GetAccountQueryVariables>(GetAccountDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useLazyQuery<GetAccountQuery, GetAccountQueryVariables>(GetAccountDocument, options);
|
||||
}
|
||||
export type GetAccountQueryHookResult = ReturnType<typeof useGetAccountQuery>;
|
||||
export type GetAccountLazyQueryHookResult = ReturnType<typeof useGetAccountLazyQuery>;
|
||||
|
@ -3,6 +3,7 @@ import * as Types from '../../types';
|
||||
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {}
|
||||
export type GetAccountingReportQueryVariables = Types.Exact<{
|
||||
category?: Types.Maybe<Types.Scalars['String']>;
|
||||
currency?: Types.Maybe<Types.Scalars['String']>;
|
||||
@ -51,10 +52,12 @@ export const GetAccountingReportDocument = gql`
|
||||
* });
|
||||
*/
|
||||
export function useGetAccountingReportQuery(baseOptions?: Apollo.QueryHookOptions<GetAccountingReportQuery, GetAccountingReportQueryVariables>) {
|
||||
return Apollo.useQuery<GetAccountingReportQuery, GetAccountingReportQueryVariables>(GetAccountingReportDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useQuery<GetAccountingReportQuery, GetAccountingReportQueryVariables>(GetAccountingReportDocument, options);
|
||||
}
|
||||
export function useGetAccountingReportLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetAccountingReportQuery, GetAccountingReportQueryVariables>) {
|
||||
return Apollo.useLazyQuery<GetAccountingReportQuery, GetAccountingReportQueryVariables>(GetAccountingReportDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useLazyQuery<GetAccountingReportQuery, GetAccountingReportQueryVariables>(GetAccountingReportDocument, options);
|
||||
}
|
||||
export type GetAccountingReportQueryHookResult = ReturnType<typeof useGetAccountingReportQuery>;
|
||||
export type GetAccountingReportLazyQueryHookResult = ReturnType<typeof useGetAccountingReportLazyQuery>;
|
||||
|
@ -3,6 +3,7 @@ import * as Types from '../../types';
|
||||
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {}
|
||||
export type GetBackupsQueryVariables = Types.Exact<{ [key: string]: never; }>;
|
||||
|
||||
|
||||
@ -34,10 +35,12 @@ export const GetBackupsDocument = gql`
|
||||
* });
|
||||
*/
|
||||
export function useGetBackupsQuery(baseOptions?: Apollo.QueryHookOptions<GetBackupsQuery, GetBackupsQueryVariables>) {
|
||||
return Apollo.useQuery<GetBackupsQuery, GetBackupsQueryVariables>(GetBackupsDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useQuery<GetBackupsQuery, GetBackupsQueryVariables>(GetBackupsDocument, options);
|
||||
}
|
||||
export function useGetBackupsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetBackupsQuery, GetBackupsQueryVariables>) {
|
||||
return Apollo.useLazyQuery<GetBackupsQuery, GetBackupsQueryVariables>(GetBackupsDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useLazyQuery<GetBackupsQuery, GetBackupsQueryVariables>(GetBackupsDocument, options);
|
||||
}
|
||||
export type GetBackupsQueryHookResult = ReturnType<typeof useGetBackupsQuery>;
|
||||
export type GetBackupsLazyQueryHookResult = ReturnType<typeof useGetBackupsLazyQuery>;
|
||||
|
@ -3,6 +3,7 @@ import * as Types from '../../types';
|
||||
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {}
|
||||
export type GetBaseCanConnectQueryVariables = Types.Exact<{ [key: string]: never; }>;
|
||||
|
||||
|
||||
@ -34,10 +35,12 @@ export const GetBaseCanConnectDocument = gql`
|
||||
* });
|
||||
*/
|
||||
export function useGetBaseCanConnectQuery(baseOptions?: Apollo.QueryHookOptions<GetBaseCanConnectQuery, GetBaseCanConnectQueryVariables>) {
|
||||
return Apollo.useQuery<GetBaseCanConnectQuery, GetBaseCanConnectQueryVariables>(GetBaseCanConnectDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useQuery<GetBaseCanConnectQuery, GetBaseCanConnectQueryVariables>(GetBaseCanConnectDocument, options);
|
||||
}
|
||||
export function useGetBaseCanConnectLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetBaseCanConnectQuery, GetBaseCanConnectQueryVariables>) {
|
||||
return Apollo.useLazyQuery<GetBaseCanConnectQuery, GetBaseCanConnectQueryVariables>(GetBaseCanConnectDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useLazyQuery<GetBaseCanConnectQuery, GetBaseCanConnectQueryVariables>(GetBaseCanConnectDocument, options);
|
||||
}
|
||||
export type GetBaseCanConnectQueryHookResult = ReturnType<typeof useGetBaseCanConnectQuery>;
|
||||
export type GetBaseCanConnectLazyQueryHookResult = ReturnType<typeof useGetBaseCanConnectLazyQuery>;
|
||||
|
@ -3,6 +3,7 @@ import * as Types from '../../types';
|
||||
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {}
|
||||
export type GetBaseInfoQueryVariables = Types.Exact<{ [key: string]: never; }>;
|
||||
|
||||
|
||||
@ -41,10 +42,12 @@ export const GetBaseInfoDocument = gql`
|
||||
* });
|
||||
*/
|
||||
export function useGetBaseInfoQuery(baseOptions?: Apollo.QueryHookOptions<GetBaseInfoQuery, GetBaseInfoQueryVariables>) {
|
||||
return Apollo.useQuery<GetBaseInfoQuery, GetBaseInfoQueryVariables>(GetBaseInfoDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useQuery<GetBaseInfoQuery, GetBaseInfoQueryVariables>(GetBaseInfoDocument, options);
|
||||
}
|
||||
export function useGetBaseInfoLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetBaseInfoQuery, GetBaseInfoQueryVariables>) {
|
||||
return Apollo.useLazyQuery<GetBaseInfoQuery, GetBaseInfoQueryVariables>(GetBaseInfoDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useLazyQuery<GetBaseInfoQuery, GetBaseInfoQueryVariables>(GetBaseInfoDocument, options);
|
||||
}
|
||||
export type GetBaseInfoQueryHookResult = ReturnType<typeof useGetBaseInfoQuery>;
|
||||
export type GetBaseInfoLazyQueryHookResult = ReturnType<typeof useGetBaseInfoLazyQuery>;
|
||||
|
@ -3,6 +3,7 @@ import * as Types from '../../types';
|
||||
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {}
|
||||
export type GetBaseNodesQueryVariables = Types.Exact<{ [key: string]: never; }>;
|
||||
|
||||
|
||||
@ -42,10 +43,12 @@ export const GetBaseNodesDocument = gql`
|
||||
* });
|
||||
*/
|
||||
export function useGetBaseNodesQuery(baseOptions?: Apollo.QueryHookOptions<GetBaseNodesQuery, GetBaseNodesQueryVariables>) {
|
||||
return Apollo.useQuery<GetBaseNodesQuery, GetBaseNodesQueryVariables>(GetBaseNodesDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useQuery<GetBaseNodesQuery, GetBaseNodesQueryVariables>(GetBaseNodesDocument, options);
|
||||
}
|
||||
export function useGetBaseNodesLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetBaseNodesQuery, GetBaseNodesQueryVariables>) {
|
||||
return Apollo.useLazyQuery<GetBaseNodesQuery, GetBaseNodesQueryVariables>(GetBaseNodesDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useLazyQuery<GetBaseNodesQuery, GetBaseNodesQueryVariables>(GetBaseNodesDocument, options);
|
||||
}
|
||||
export type GetBaseNodesQueryHookResult = ReturnType<typeof useGetBaseNodesQuery>;
|
||||
export type GetBaseNodesLazyQueryHookResult = ReturnType<typeof useGetBaseNodesLazyQuery>;
|
||||
|
@ -3,6 +3,7 @@ import * as Types from '../../types';
|
||||
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {}
|
||||
export type GetBasePointsQueryVariables = Types.Exact<{ [key: string]: never; }>;
|
||||
|
||||
|
||||
@ -40,10 +41,12 @@ export const GetBasePointsDocument = gql`
|
||||
* });
|
||||
*/
|
||||
export function useGetBasePointsQuery(baseOptions?: Apollo.QueryHookOptions<GetBasePointsQuery, GetBasePointsQueryVariables>) {
|
||||
return Apollo.useQuery<GetBasePointsQuery, GetBasePointsQueryVariables>(GetBasePointsDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useQuery<GetBasePointsQuery, GetBasePointsQueryVariables>(GetBasePointsDocument, options);
|
||||
}
|
||||
export function useGetBasePointsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetBasePointsQuery, GetBasePointsQueryVariables>) {
|
||||
return Apollo.useLazyQuery<GetBasePointsQuery, GetBasePointsQueryVariables>(GetBasePointsDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useLazyQuery<GetBasePointsQuery, GetBasePointsQueryVariables>(GetBasePointsDocument, options);
|
||||
}
|
||||
export type GetBasePointsQueryHookResult = ReturnType<typeof useGetBasePointsQuery>;
|
||||
export type GetBasePointsLazyQueryHookResult = ReturnType<typeof useGetBasePointsLazyQuery>;
|
||||
|
@ -3,6 +3,7 @@ import * as Types from '../../types';
|
||||
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {}
|
||||
export type GetBitcoinFeesQueryVariables = Types.Exact<{ [key: string]: never; }>;
|
||||
|
||||
|
||||
@ -41,10 +42,12 @@ export const GetBitcoinFeesDocument = gql`
|
||||
* });
|
||||
*/
|
||||
export function useGetBitcoinFeesQuery(baseOptions?: Apollo.QueryHookOptions<GetBitcoinFeesQuery, GetBitcoinFeesQueryVariables>) {
|
||||
return Apollo.useQuery<GetBitcoinFeesQuery, GetBitcoinFeesQueryVariables>(GetBitcoinFeesDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useQuery<GetBitcoinFeesQuery, GetBitcoinFeesQueryVariables>(GetBitcoinFeesDocument, options);
|
||||
}
|
||||
export function useGetBitcoinFeesLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetBitcoinFeesQuery, GetBitcoinFeesQueryVariables>) {
|
||||
return Apollo.useLazyQuery<GetBitcoinFeesQuery, GetBitcoinFeesQueryVariables>(GetBitcoinFeesDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useLazyQuery<GetBitcoinFeesQuery, GetBitcoinFeesQueryVariables>(GetBitcoinFeesDocument, options);
|
||||
}
|
||||
export type GetBitcoinFeesQueryHookResult = ReturnType<typeof useGetBitcoinFeesQuery>;
|
||||
export type GetBitcoinFeesLazyQueryHookResult = ReturnType<typeof useGetBitcoinFeesLazyQuery>;
|
||||
|
@ -3,6 +3,7 @@ import * as Types from '../../types';
|
||||
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {}
|
||||
export type GetBitcoinPriceQueryVariables = Types.Exact<{ [key: string]: never; }>;
|
||||
|
||||
|
||||
@ -34,10 +35,12 @@ export const GetBitcoinPriceDocument = gql`
|
||||
* });
|
||||
*/
|
||||
export function useGetBitcoinPriceQuery(baseOptions?: Apollo.QueryHookOptions<GetBitcoinPriceQuery, GetBitcoinPriceQueryVariables>) {
|
||||
return Apollo.useQuery<GetBitcoinPriceQuery, GetBitcoinPriceQueryVariables>(GetBitcoinPriceDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useQuery<GetBitcoinPriceQuery, GetBitcoinPriceQueryVariables>(GetBitcoinPriceDocument, options);
|
||||
}
|
||||
export function useGetBitcoinPriceLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetBitcoinPriceQuery, GetBitcoinPriceQueryVariables>) {
|
||||
return Apollo.useLazyQuery<GetBitcoinPriceQuery, GetBitcoinPriceQueryVariables>(GetBitcoinPriceDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useLazyQuery<GetBitcoinPriceQuery, GetBitcoinPriceQueryVariables>(GetBitcoinPriceDocument, options);
|
||||
}
|
||||
export type GetBitcoinPriceQueryHookResult = ReturnType<typeof useGetBitcoinPriceQuery>;
|
||||
export type GetBitcoinPriceLazyQueryHookResult = ReturnType<typeof useGetBitcoinPriceLazyQuery>;
|
||||
|
@ -3,6 +3,7 @@ import * as Types from '../../types';
|
||||
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {}
|
||||
export type GetBoltzInfoQueryVariables = Types.Exact<{ [key: string]: never; }>;
|
||||
|
||||
|
||||
@ -41,10 +42,12 @@ export const GetBoltzInfoDocument = gql`
|
||||
* });
|
||||
*/
|
||||
export function useGetBoltzInfoQuery(baseOptions?: Apollo.QueryHookOptions<GetBoltzInfoQuery, GetBoltzInfoQueryVariables>) {
|
||||
return Apollo.useQuery<GetBoltzInfoQuery, GetBoltzInfoQueryVariables>(GetBoltzInfoDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useQuery<GetBoltzInfoQuery, GetBoltzInfoQueryVariables>(GetBoltzInfoDocument, options);
|
||||
}
|
||||
export function useGetBoltzInfoLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetBoltzInfoQuery, GetBoltzInfoQueryVariables>) {
|
||||
return Apollo.useLazyQuery<GetBoltzInfoQuery, GetBoltzInfoQueryVariables>(GetBoltzInfoDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useLazyQuery<GetBoltzInfoQuery, GetBoltzInfoQueryVariables>(GetBoltzInfoDocument, options);
|
||||
}
|
||||
export type GetBoltzInfoQueryHookResult = ReturnType<typeof useGetBoltzInfoQuery>;
|
||||
export type GetBoltzInfoLazyQueryHookResult = ReturnType<typeof useGetBoltzInfoLazyQuery>;
|
||||
|
@ -3,6 +3,7 @@ import * as Types from '../../types';
|
||||
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {}
|
||||
export type GetBoltzSwapStatusQueryVariables = Types.Exact<{
|
||||
ids: Array<Types.Maybe<Types.Scalars['String']>> | Types.Maybe<Types.Scalars['String']>;
|
||||
}>;
|
||||
@ -58,10 +59,12 @@ export const GetBoltzSwapStatusDocument = gql`
|
||||
* });
|
||||
*/
|
||||
export function useGetBoltzSwapStatusQuery(baseOptions: Apollo.QueryHookOptions<GetBoltzSwapStatusQuery, GetBoltzSwapStatusQueryVariables>) {
|
||||
return Apollo.useQuery<GetBoltzSwapStatusQuery, GetBoltzSwapStatusQueryVariables>(GetBoltzSwapStatusDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useQuery<GetBoltzSwapStatusQuery, GetBoltzSwapStatusQueryVariables>(GetBoltzSwapStatusDocument, options);
|
||||
}
|
||||
export function useGetBoltzSwapStatusLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetBoltzSwapStatusQuery, GetBoltzSwapStatusQueryVariables>) {
|
||||
return Apollo.useLazyQuery<GetBoltzSwapStatusQuery, GetBoltzSwapStatusQueryVariables>(GetBoltzSwapStatusDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useLazyQuery<GetBoltzSwapStatusQuery, GetBoltzSwapStatusQueryVariables>(GetBoltzSwapStatusDocument, options);
|
||||
}
|
||||
export type GetBoltzSwapStatusQueryHookResult = ReturnType<typeof useGetBoltzSwapStatusQuery>;
|
||||
export type GetBoltzSwapStatusLazyQueryHookResult = ReturnType<typeof useGetBoltzSwapStatusLazyQuery>;
|
||||
|
@ -3,6 +3,7 @@ import * as Types from '../../types';
|
||||
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {}
|
||||
export type GetBosNodeScoresQueryVariables = Types.Exact<{
|
||||
publicKey: Types.Scalars['String'];
|
||||
}>;
|
||||
@ -46,10 +47,12 @@ export const GetBosNodeScoresDocument = gql`
|
||||
* });
|
||||
*/
|
||||
export function useGetBosNodeScoresQuery(baseOptions: Apollo.QueryHookOptions<GetBosNodeScoresQuery, GetBosNodeScoresQueryVariables>) {
|
||||
return Apollo.useQuery<GetBosNodeScoresQuery, GetBosNodeScoresQueryVariables>(GetBosNodeScoresDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useQuery<GetBosNodeScoresQuery, GetBosNodeScoresQueryVariables>(GetBosNodeScoresDocument, options);
|
||||
}
|
||||
export function useGetBosNodeScoresLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetBosNodeScoresQuery, GetBosNodeScoresQueryVariables>) {
|
||||
return Apollo.useLazyQuery<GetBosNodeScoresQuery, GetBosNodeScoresQueryVariables>(GetBosNodeScoresDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useLazyQuery<GetBosNodeScoresQuery, GetBosNodeScoresQueryVariables>(GetBosNodeScoresDocument, options);
|
||||
}
|
||||
export type GetBosNodeScoresQueryHookResult = ReturnType<typeof useGetBosNodeScoresQuery>;
|
||||
export type GetBosNodeScoresLazyQueryHookResult = ReturnType<typeof useGetBosNodeScoresLazyQuery>;
|
||||
|
@ -3,6 +3,7 @@ import * as Types from '../../types';
|
||||
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {}
|
||||
export type GetBosScoresQueryVariables = Types.Exact<{ [key: string]: never; }>;
|
||||
|
||||
|
||||
@ -50,10 +51,12 @@ export const GetBosScoresDocument = gql`
|
||||
* });
|
||||
*/
|
||||
export function useGetBosScoresQuery(baseOptions?: Apollo.QueryHookOptions<GetBosScoresQuery, GetBosScoresQueryVariables>) {
|
||||
return Apollo.useQuery<GetBosScoresQuery, GetBosScoresQueryVariables>(GetBosScoresDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useQuery<GetBosScoresQuery, GetBosScoresQueryVariables>(GetBosScoresDocument, options);
|
||||
}
|
||||
export function useGetBosScoresLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetBosScoresQuery, GetBosScoresQueryVariables>) {
|
||||
return Apollo.useLazyQuery<GetBosScoresQuery, GetBosScoresQueryVariables>(GetBosScoresDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useLazyQuery<GetBosScoresQuery, GetBosScoresQueryVariables>(GetBosScoresDocument, options);
|
||||
}
|
||||
export type GetBosScoresQueryHookResult = ReturnType<typeof useGetBosScoresQuery>;
|
||||
export type GetBosScoresLazyQueryHookResult = ReturnType<typeof useGetBosScoresLazyQuery>;
|
||||
|
@ -3,6 +3,7 @@ import * as Types from '../../types';
|
||||
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {}
|
||||
export type GetChainTransactionsQueryVariables = Types.Exact<{ [key: string]: never; }>;
|
||||
|
||||
|
||||
@ -46,10 +47,12 @@ export const GetChainTransactionsDocument = gql`
|
||||
* });
|
||||
*/
|
||||
export function useGetChainTransactionsQuery(baseOptions?: Apollo.QueryHookOptions<GetChainTransactionsQuery, GetChainTransactionsQueryVariables>) {
|
||||
return Apollo.useQuery<GetChainTransactionsQuery, GetChainTransactionsQueryVariables>(GetChainTransactionsDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useQuery<GetChainTransactionsQuery, GetChainTransactionsQueryVariables>(GetChainTransactionsDocument, options);
|
||||
}
|
||||
export function useGetChainTransactionsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetChainTransactionsQuery, GetChainTransactionsQueryVariables>) {
|
||||
return Apollo.useLazyQuery<GetChainTransactionsQuery, GetChainTransactionsQueryVariables>(GetChainTransactionsDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useLazyQuery<GetChainTransactionsQuery, GetChainTransactionsQueryVariables>(GetChainTransactionsDocument, options);
|
||||
}
|
||||
export type GetChainTransactionsQueryHookResult = ReturnType<typeof useGetChainTransactionsQuery>;
|
||||
export type GetChainTransactionsLazyQueryHookResult = ReturnType<typeof useGetChainTransactionsLazyQuery>;
|
||||
|
72
src/graphql/queries/__generated__/getChannel.generated.tsx
generated
Normal file
72
src/graphql/queries/__generated__/getChannel.generated.tsx
generated
Normal file
@ -0,0 +1,72 @@
|
||||
/* eslint-disable */
|
||||
import * as Types from '../../types';
|
||||
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {}
|
||||
export type GetChannelQueryVariables = Types.Exact<{
|
||||
id: Types.Scalars['String'];
|
||||
pubkey?: Types.Maybe<Types.Scalars['String']>;
|
||||
}>;
|
||||
|
||||
|
||||
export type GetChannelQuery = (
|
||||
{ __typename?: 'Query' }
|
||||
& { getChannel: (
|
||||
{ __typename?: 'singleChannelType' }
|
||||
& { partner_node_policies?: Types.Maybe<(
|
||||
{ __typename?: 'nodePolicyType' }
|
||||
& { node?: Types.Maybe<(
|
||||
{ __typename?: 'Node' }
|
||||
& { node: (
|
||||
{ __typename?: 'nodeType' }
|
||||
& Pick<Types.NodeType, 'alias'>
|
||||
) }
|
||||
)> }
|
||||
)> }
|
||||
) }
|
||||
);
|
||||
|
||||
|
||||
export const GetChannelDocument = gql`
|
||||
query GetChannel($id: String!, $pubkey: String) {
|
||||
getChannel(id: $id, pubkey: $pubkey) {
|
||||
partner_node_policies {
|
||||
node {
|
||||
node {
|
||||
alias
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
/**
|
||||
* __useGetChannelQuery__
|
||||
*
|
||||
* To run a query within a React component, call `useGetChannelQuery` and pass it any options that fit your needs.
|
||||
* When your component renders, `useGetChannelQuery` returns an object from Apollo Client that contains loading, error, and data properties
|
||||
* you can use to render your UI.
|
||||
*
|
||||
* @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
|
||||
*
|
||||
* @example
|
||||
* const { data, loading, error } = useGetChannelQuery({
|
||||
* variables: {
|
||||
* id: // value for 'id'
|
||||
* pubkey: // value for 'pubkey'
|
||||
* },
|
||||
* });
|
||||
*/
|
||||
export function useGetChannelQuery(baseOptions: Apollo.QueryHookOptions<GetChannelQuery, GetChannelQueryVariables>) {
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useQuery<GetChannelQuery, GetChannelQueryVariables>(GetChannelDocument, options);
|
||||
}
|
||||
export function useGetChannelLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetChannelQuery, GetChannelQueryVariables>) {
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useLazyQuery<GetChannelQuery, GetChannelQueryVariables>(GetChannelDocument, options);
|
||||
}
|
||||
export type GetChannelQueryHookResult = ReturnType<typeof useGetChannelQuery>;
|
||||
export type GetChannelLazyQueryHookResult = ReturnType<typeof useGetChannelLazyQuery>;
|
||||
export type GetChannelQueryResult = Apollo.QueryResult<GetChannelQuery, GetChannelQueryVariables>;
|
@ -3,6 +3,7 @@ import * as Types from '../../types';
|
||||
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {}
|
||||
export type ChannelFeesQueryVariables = Types.Exact<{ [key: string]: never; }>;
|
||||
|
||||
|
||||
@ -80,10 +81,12 @@ export const ChannelFeesDocument = gql`
|
||||
* });
|
||||
*/
|
||||
export function useChannelFeesQuery(baseOptions?: Apollo.QueryHookOptions<ChannelFeesQuery, ChannelFeesQueryVariables>) {
|
||||
return Apollo.useQuery<ChannelFeesQuery, ChannelFeesQueryVariables>(ChannelFeesDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useQuery<ChannelFeesQuery, ChannelFeesQueryVariables>(ChannelFeesDocument, options);
|
||||
}
|
||||
export function useChannelFeesLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<ChannelFeesQuery, ChannelFeesQueryVariables>) {
|
||||
return Apollo.useLazyQuery<ChannelFeesQuery, ChannelFeesQueryVariables>(ChannelFeesDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useLazyQuery<ChannelFeesQuery, ChannelFeesQueryVariables>(ChannelFeesDocument, options);
|
||||
}
|
||||
export type ChannelFeesQueryHookResult = ReturnType<typeof useChannelFeesQuery>;
|
||||
export type ChannelFeesLazyQueryHookResult = ReturnType<typeof useChannelFeesLazyQuery>;
|
||||
|
@ -3,6 +3,7 @@ import * as Types from '../../types';
|
||||
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {}
|
||||
export type GetLiquidReportQueryVariables = Types.Exact<{ [key: string]: never; }>;
|
||||
|
||||
|
||||
@ -46,10 +47,12 @@ export const GetLiquidReportDocument = gql`
|
||||
* });
|
||||
*/
|
||||
export function useGetLiquidReportQuery(baseOptions?: Apollo.QueryHookOptions<GetLiquidReportQuery, GetLiquidReportQueryVariables>) {
|
||||
return Apollo.useQuery<GetLiquidReportQuery, GetLiquidReportQueryVariables>(GetLiquidReportDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useQuery<GetLiquidReportQuery, GetLiquidReportQueryVariables>(GetLiquidReportDocument, options);
|
||||
}
|
||||
export function useGetLiquidReportLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetLiquidReportQuery, GetLiquidReportQueryVariables>) {
|
||||
return Apollo.useLazyQuery<GetLiquidReportQuery, GetLiquidReportQueryVariables>(GetLiquidReportDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useLazyQuery<GetLiquidReportQuery, GetLiquidReportQueryVariables>(GetLiquidReportDocument, options);
|
||||
}
|
||||
export type GetLiquidReportQueryHookResult = ReturnType<typeof useGetLiquidReportQuery>;
|
||||
export type GetLiquidReportLazyQueryHookResult = ReturnType<typeof useGetLiquidReportLazyQuery>;
|
||||
|
@ -3,6 +3,7 @@ import * as Types from '../../types';
|
||||
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {}
|
||||
export type GetChannelsQueryVariables = Types.Exact<{
|
||||
active?: Types.Maybe<Types.Scalars['Boolean']>;
|
||||
}>;
|
||||
@ -124,10 +125,12 @@ export const GetChannelsDocument = gql`
|
||||
* });
|
||||
*/
|
||||
export function useGetChannelsQuery(baseOptions?: Apollo.QueryHookOptions<GetChannelsQuery, GetChannelsQueryVariables>) {
|
||||
return Apollo.useQuery<GetChannelsQuery, GetChannelsQueryVariables>(GetChannelsDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useQuery<GetChannelsQuery, GetChannelsQueryVariables>(GetChannelsDocument, options);
|
||||
}
|
||||
export function useGetChannelsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetChannelsQuery, GetChannelsQueryVariables>) {
|
||||
return Apollo.useLazyQuery<GetChannelsQuery, GetChannelsQueryVariables>(GetChannelsDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useLazyQuery<GetChannelsQuery, GetChannelsQueryVariables>(GetChannelsDocument, options);
|
||||
}
|
||||
export type GetChannelsQueryHookResult = ReturnType<typeof useGetChannelsQuery>;
|
||||
export type GetChannelsLazyQueryHookResult = ReturnType<typeof useGetChannelsLazyQuery>;
|
||||
|
@ -3,6 +3,7 @@ import * as Types from '../../types';
|
||||
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {}
|
||||
export type GetClosedChannelsQueryVariables = Types.Exact<{ [key: string]: never; }>;
|
||||
|
||||
|
||||
@ -69,10 +70,12 @@ export const GetClosedChannelsDocument = gql`
|
||||
* });
|
||||
*/
|
||||
export function useGetClosedChannelsQuery(baseOptions?: Apollo.QueryHookOptions<GetClosedChannelsQuery, GetClosedChannelsQueryVariables>) {
|
||||
return Apollo.useQuery<GetClosedChannelsQuery, GetClosedChannelsQueryVariables>(GetClosedChannelsDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useQuery<GetClosedChannelsQuery, GetClosedChannelsQueryVariables>(GetClosedChannelsDocument, options);
|
||||
}
|
||||
export function useGetClosedChannelsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetClosedChannelsQuery, GetClosedChannelsQueryVariables>) {
|
||||
return Apollo.useLazyQuery<GetClosedChannelsQuery, GetClosedChannelsQueryVariables>(GetClosedChannelsDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useLazyQuery<GetClosedChannelsQuery, GetClosedChannelsQueryVariables>(GetClosedChannelsDocument, options);
|
||||
}
|
||||
export type GetClosedChannelsQueryHookResult = ReturnType<typeof useGetClosedChannelsQuery>;
|
||||
export type GetClosedChannelsLazyQueryHookResult = ReturnType<typeof useGetClosedChannelsLazyQuery>;
|
||||
|
@ -3,6 +3,7 @@ import * as Types from '../../types';
|
||||
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {}
|
||||
export type GetFeeHealthQueryVariables = Types.Exact<{ [key: string]: never; }>;
|
||||
|
||||
|
||||
@ -82,10 +83,12 @@ export const GetFeeHealthDocument = gql`
|
||||
* });
|
||||
*/
|
||||
export function useGetFeeHealthQuery(baseOptions?: Apollo.QueryHookOptions<GetFeeHealthQuery, GetFeeHealthQueryVariables>) {
|
||||
return Apollo.useQuery<GetFeeHealthQuery, GetFeeHealthQueryVariables>(GetFeeHealthDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useQuery<GetFeeHealthQuery, GetFeeHealthQueryVariables>(GetFeeHealthDocument, options);
|
||||
}
|
||||
export function useGetFeeHealthLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetFeeHealthQuery, GetFeeHealthQueryVariables>) {
|
||||
return Apollo.useLazyQuery<GetFeeHealthQuery, GetFeeHealthQueryVariables>(GetFeeHealthDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useLazyQuery<GetFeeHealthQuery, GetFeeHealthQueryVariables>(GetFeeHealthDocument, options);
|
||||
}
|
||||
export type GetFeeHealthQueryHookResult = ReturnType<typeof useGetFeeHealthQuery>;
|
||||
export type GetFeeHealthLazyQueryHookResult = ReturnType<typeof useGetFeeHealthLazyQuery>;
|
||||
|
61
src/graphql/queries/__generated__/getForwards.generated.tsx
generated
Normal file
61
src/graphql/queries/__generated__/getForwards.generated.tsx
generated
Normal file
@ -0,0 +1,61 @@
|
||||
/* eslint-disable */
|
||||
import * as Types from '../../types';
|
||||
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {}
|
||||
export type GetForwardsQueryVariables = Types.Exact<{
|
||||
days: Types.Scalars['Int'];
|
||||
}>;
|
||||
|
||||
|
||||
export type GetForwardsQuery = (
|
||||
{ __typename?: 'Query' }
|
||||
& { getForwards: Array<Types.Maybe<(
|
||||
{ __typename?: 'Forward' }
|
||||
& Pick<Types.Forward, 'created_at' | 'fee' | 'fee_mtokens' | 'incoming_channel' | 'mtokens' | 'outgoing_channel' | 'tokens'>
|
||||
)>> }
|
||||
);
|
||||
|
||||
|
||||
export const GetForwardsDocument = gql`
|
||||
query GetForwards($days: Int!) {
|
||||
getForwards(days: $days) {
|
||||
created_at
|
||||
fee
|
||||
fee_mtokens
|
||||
incoming_channel
|
||||
mtokens
|
||||
outgoing_channel
|
||||
tokens
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
/**
|
||||
* __useGetForwardsQuery__
|
||||
*
|
||||
* To run a query within a React component, call `useGetForwardsQuery` and pass it any options that fit your needs.
|
||||
* When your component renders, `useGetForwardsQuery` returns an object from Apollo Client that contains loading, error, and data properties
|
||||
* you can use to render your UI.
|
||||
*
|
||||
* @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
|
||||
*
|
||||
* @example
|
||||
* const { data, loading, error } = useGetForwardsQuery({
|
||||
* variables: {
|
||||
* days: // value for 'days'
|
||||
* },
|
||||
* });
|
||||
*/
|
||||
export function useGetForwardsQuery(baseOptions: Apollo.QueryHookOptions<GetForwardsQuery, GetForwardsQueryVariables>) {
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useQuery<GetForwardsQuery, GetForwardsQueryVariables>(GetForwardsDocument, options);
|
||||
}
|
||||
export function useGetForwardsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetForwardsQuery, GetForwardsQueryVariables>) {
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useLazyQuery<GetForwardsQuery, GetForwardsQueryVariables>(GetForwardsDocument, options);
|
||||
}
|
||||
export type GetForwardsQueryHookResult = ReturnType<typeof useGetForwardsQuery>;
|
||||
export type GetForwardsLazyQueryHookResult = ReturnType<typeof useGetForwardsLazyQuery>;
|
||||
export type GetForwardsQueryResult = Apollo.QueryResult<GetForwardsQuery, GetForwardsQueryVariables>;
|
@ -1,75 +0,0 @@
|
||||
/* eslint-disable */
|
||||
import * as Types from '../../types';
|
||||
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
export type GetForwardsPastDaysQueryVariables = Types.Exact<{
|
||||
days: Types.Scalars['Int'];
|
||||
}>;
|
||||
|
||||
|
||||
export type GetForwardsPastDaysQuery = (
|
||||
{ __typename?: 'Query' }
|
||||
& { getForwardsPastDays: Array<Types.Maybe<(
|
||||
{ __typename?: 'Forward' }
|
||||
& Pick<Types.Forward, 'created_at' | 'fee' | 'fee_mtokens' | 'incoming_channel' | 'mtokens' | 'outgoing_channel' | 'tokens'>
|
||||
& { incoming_node?: Types.Maybe<(
|
||||
{ __typename?: 'ForwardNodeType' }
|
||||
& Pick<Types.ForwardNodeType, 'alias' | 'public_key' | 'channel_id'>
|
||||
)>, outgoing_node?: Types.Maybe<(
|
||||
{ __typename?: 'ForwardNodeType' }
|
||||
& Pick<Types.ForwardNodeType, 'alias' | 'public_key' | 'channel_id'>
|
||||
)> }
|
||||
)>> }
|
||||
);
|
||||
|
||||
|
||||
export const GetForwardsPastDaysDocument = gql`
|
||||
query GetForwardsPastDays($days: Int!) {
|
||||
getForwardsPastDays(days: $days) {
|
||||
created_at
|
||||
fee
|
||||
fee_mtokens
|
||||
incoming_channel
|
||||
mtokens
|
||||
outgoing_channel
|
||||
tokens
|
||||
incoming_node {
|
||||
alias
|
||||
public_key
|
||||
channel_id
|
||||
}
|
||||
outgoing_node {
|
||||
alias
|
||||
public_key
|
||||
channel_id
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
/**
|
||||
* __useGetForwardsPastDaysQuery__
|
||||
*
|
||||
* To run a query within a React component, call `useGetForwardsPastDaysQuery` and pass it any options that fit your needs.
|
||||
* When your component renders, `useGetForwardsPastDaysQuery` returns an object from Apollo Client that contains loading, error, and data properties
|
||||
* you can use to render your UI.
|
||||
*
|
||||
* @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
|
||||
*
|
||||
* @example
|
||||
* const { data, loading, error } = useGetForwardsPastDaysQuery({
|
||||
* variables: {
|
||||
* days: // value for 'days'
|
||||
* },
|
||||
* });
|
||||
*/
|
||||
export function useGetForwardsPastDaysQuery(baseOptions: Apollo.QueryHookOptions<GetForwardsPastDaysQuery, GetForwardsPastDaysQueryVariables>) {
|
||||
return Apollo.useQuery<GetForwardsPastDaysQuery, GetForwardsPastDaysQueryVariables>(GetForwardsPastDaysDocument, baseOptions);
|
||||
}
|
||||
export function useGetForwardsPastDaysLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetForwardsPastDaysQuery, GetForwardsPastDaysQueryVariables>) {
|
||||
return Apollo.useLazyQuery<GetForwardsPastDaysQuery, GetForwardsPastDaysQueryVariables>(GetForwardsPastDaysDocument, baseOptions);
|
||||
}
|
||||
export type GetForwardsPastDaysQueryHookResult = ReturnType<typeof useGetForwardsPastDaysQuery>;
|
||||
export type GetForwardsPastDaysLazyQueryHookResult = ReturnType<typeof useGetForwardsPastDaysLazyQuery>;
|
||||
export type GetForwardsPastDaysQueryResult = Apollo.QueryResult<GetForwardsPastDaysQuery, GetForwardsPastDaysQueryVariables>;
|
@ -3,6 +3,7 @@ import * as Types from '../../types';
|
||||
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {}
|
||||
export type GetInOutQueryVariables = Types.Exact<{
|
||||
time?: Types.Maybe<Types.Scalars['String']>;
|
||||
}>;
|
||||
@ -45,10 +46,12 @@ export const GetInOutDocument = gql`
|
||||
* });
|
||||
*/
|
||||
export function useGetInOutQuery(baseOptions?: Apollo.QueryHookOptions<GetInOutQuery, GetInOutQueryVariables>) {
|
||||
return Apollo.useQuery<GetInOutQuery, GetInOutQueryVariables>(GetInOutDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useQuery<GetInOutQuery, GetInOutQueryVariables>(GetInOutDocument, options);
|
||||
}
|
||||
export function useGetInOutLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetInOutQuery, GetInOutQueryVariables>) {
|
||||
return Apollo.useLazyQuery<GetInOutQuery, GetInOutQueryVariables>(GetInOutDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useLazyQuery<GetInOutQuery, GetInOutQueryVariables>(GetInOutDocument, options);
|
||||
}
|
||||
export type GetInOutQueryHookResult = ReturnType<typeof useGetInOutQuery>;
|
||||
export type GetInOutLazyQueryHookResult = ReturnType<typeof useGetInOutLazyQuery>;
|
||||
|
@ -3,6 +3,7 @@ import * as Types from '../../types';
|
||||
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {}
|
||||
export type GetInvoiceStatusChangeQueryVariables = Types.Exact<{
|
||||
id: Types.Scalars['String'];
|
||||
}>;
|
||||
@ -37,10 +38,12 @@ export const GetInvoiceStatusChangeDocument = gql`
|
||||
* });
|
||||
*/
|
||||
export function useGetInvoiceStatusChangeQuery(baseOptions: Apollo.QueryHookOptions<GetInvoiceStatusChangeQuery, GetInvoiceStatusChangeQueryVariables>) {
|
||||
return Apollo.useQuery<GetInvoiceStatusChangeQuery, GetInvoiceStatusChangeQueryVariables>(GetInvoiceStatusChangeDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useQuery<GetInvoiceStatusChangeQuery, GetInvoiceStatusChangeQueryVariables>(GetInvoiceStatusChangeDocument, options);
|
||||
}
|
||||
export function useGetInvoiceStatusChangeLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetInvoiceStatusChangeQuery, GetInvoiceStatusChangeQueryVariables>) {
|
||||
return Apollo.useLazyQuery<GetInvoiceStatusChangeQuery, GetInvoiceStatusChangeQueryVariables>(GetInvoiceStatusChangeDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useLazyQuery<GetInvoiceStatusChangeQuery, GetInvoiceStatusChangeQueryVariables>(GetInvoiceStatusChangeDocument, options);
|
||||
}
|
||||
export type GetInvoiceStatusChangeQueryHookResult = ReturnType<typeof useGetInvoiceStatusChangeQuery>;
|
||||
export type GetInvoiceStatusChangeLazyQueryHookResult = ReturnType<typeof useGetInvoiceStatusChangeLazyQuery>;
|
||||
|
@ -3,6 +3,7 @@ import * as Types from '../../types';
|
||||
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {}
|
||||
export type GetLatestVersionQueryVariables = Types.Exact<{ [key: string]: never; }>;
|
||||
|
||||
|
||||
@ -34,10 +35,12 @@ export const GetLatestVersionDocument = gql`
|
||||
* });
|
||||
*/
|
||||
export function useGetLatestVersionQuery(baseOptions?: Apollo.QueryHookOptions<GetLatestVersionQuery, GetLatestVersionQueryVariables>) {
|
||||
return Apollo.useQuery<GetLatestVersionQuery, GetLatestVersionQueryVariables>(GetLatestVersionDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useQuery<GetLatestVersionQuery, GetLatestVersionQueryVariables>(GetLatestVersionDocument, options);
|
||||
}
|
||||
export function useGetLatestVersionLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetLatestVersionQuery, GetLatestVersionQueryVariables>) {
|
||||
return Apollo.useLazyQuery<GetLatestVersionQuery, GetLatestVersionQueryVariables>(GetLatestVersionDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useLazyQuery<GetLatestVersionQuery, GetLatestVersionQueryVariables>(GetLatestVersionDocument, options);
|
||||
}
|
||||
export type GetLatestVersionQueryHookResult = ReturnType<typeof useGetLatestVersionQuery>;
|
||||
export type GetLatestVersionLazyQueryHookResult = ReturnType<typeof useGetLatestVersionLazyQuery>;
|
||||
|
@ -3,6 +3,7 @@ import * as Types from '../../types';
|
||||
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {}
|
||||
export type GetLnMarketsStatusQueryVariables = Types.Exact<{ [key: string]: never; }>;
|
||||
|
||||
|
||||
@ -34,10 +35,12 @@ export const GetLnMarketsStatusDocument = gql`
|
||||
* });
|
||||
*/
|
||||
export function useGetLnMarketsStatusQuery(baseOptions?: Apollo.QueryHookOptions<GetLnMarketsStatusQuery, GetLnMarketsStatusQueryVariables>) {
|
||||
return Apollo.useQuery<GetLnMarketsStatusQuery, GetLnMarketsStatusQueryVariables>(GetLnMarketsStatusDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useQuery<GetLnMarketsStatusQuery, GetLnMarketsStatusQueryVariables>(GetLnMarketsStatusDocument, options);
|
||||
}
|
||||
export function useGetLnMarketsStatusLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetLnMarketsStatusQuery, GetLnMarketsStatusQueryVariables>) {
|
||||
return Apollo.useLazyQuery<GetLnMarketsStatusQuery, GetLnMarketsStatusQueryVariables>(GetLnMarketsStatusDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useLazyQuery<GetLnMarketsStatusQuery, GetLnMarketsStatusQueryVariables>(GetLnMarketsStatusDocument, options);
|
||||
}
|
||||
export type GetLnMarketsStatusQueryHookResult = ReturnType<typeof useGetLnMarketsStatusQuery>;
|
||||
export type GetLnMarketsStatusLazyQueryHookResult = ReturnType<typeof useGetLnMarketsStatusLazyQuery>;
|
||||
|
@ -3,6 +3,7 @@ import * as Types from '../../types';
|
||||
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {}
|
||||
export type GetLnMarketsUrlQueryVariables = Types.Exact<{ [key: string]: never; }>;
|
||||
|
||||
|
||||
@ -34,10 +35,12 @@ export const GetLnMarketsUrlDocument = gql`
|
||||
* });
|
||||
*/
|
||||
export function useGetLnMarketsUrlQuery(baseOptions?: Apollo.QueryHookOptions<GetLnMarketsUrlQuery, GetLnMarketsUrlQueryVariables>) {
|
||||
return Apollo.useQuery<GetLnMarketsUrlQuery, GetLnMarketsUrlQueryVariables>(GetLnMarketsUrlDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useQuery<GetLnMarketsUrlQuery, GetLnMarketsUrlQueryVariables>(GetLnMarketsUrlDocument, options);
|
||||
}
|
||||
export function useGetLnMarketsUrlLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetLnMarketsUrlQuery, GetLnMarketsUrlQueryVariables>) {
|
||||
return Apollo.useLazyQuery<GetLnMarketsUrlQuery, GetLnMarketsUrlQueryVariables>(GetLnMarketsUrlDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useLazyQuery<GetLnMarketsUrlQuery, GetLnMarketsUrlQueryVariables>(GetLnMarketsUrlDocument, options);
|
||||
}
|
||||
export type GetLnMarketsUrlQueryHookResult = ReturnType<typeof useGetLnMarketsUrlQuery>;
|
||||
export type GetLnMarketsUrlLazyQueryHookResult = ReturnType<typeof useGetLnMarketsUrlLazyQuery>;
|
||||
|
@ -3,6 +3,7 @@ import * as Types from '../../types';
|
||||
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {}
|
||||
export type GetLnMarketsUserInfoQueryVariables = Types.Exact<{ [key: string]: never; }>;
|
||||
|
||||
|
||||
@ -44,10 +45,12 @@ export const GetLnMarketsUserInfoDocument = gql`
|
||||
* });
|
||||
*/
|
||||
export function useGetLnMarketsUserInfoQuery(baseOptions?: Apollo.QueryHookOptions<GetLnMarketsUserInfoQuery, GetLnMarketsUserInfoQueryVariables>) {
|
||||
return Apollo.useQuery<GetLnMarketsUserInfoQuery, GetLnMarketsUserInfoQueryVariables>(GetLnMarketsUserInfoDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useQuery<GetLnMarketsUserInfoQuery, GetLnMarketsUserInfoQueryVariables>(GetLnMarketsUserInfoDocument, options);
|
||||
}
|
||||
export function useGetLnMarketsUserInfoLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetLnMarketsUserInfoQuery, GetLnMarketsUserInfoQueryVariables>) {
|
||||
return Apollo.useLazyQuery<GetLnMarketsUserInfoQuery, GetLnMarketsUserInfoQueryVariables>(GetLnMarketsUserInfoDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useLazyQuery<GetLnMarketsUserInfoQuery, GetLnMarketsUserInfoQueryVariables>(GetLnMarketsUserInfoDocument, options);
|
||||
}
|
||||
export type GetLnMarketsUserInfoQueryHookResult = ReturnType<typeof useGetLnMarketsUserInfoQuery>;
|
||||
export type GetLnMarketsUserInfoLazyQueryHookResult = ReturnType<typeof useGetLnMarketsUserInfoLazyQuery>;
|
||||
|
@ -3,6 +3,7 @@ import * as Types from '../../types';
|
||||
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {}
|
||||
export type GetMessagesQueryVariables = Types.Exact<{
|
||||
initialize?: Types.Maybe<Types.Scalars['Boolean']>;
|
||||
lastMessage?: Types.Maybe<Types.Scalars['String']>;
|
||||
@ -58,10 +59,12 @@ export const GetMessagesDocument = gql`
|
||||
* });
|
||||
*/
|
||||
export function useGetMessagesQuery(baseOptions?: Apollo.QueryHookOptions<GetMessagesQuery, GetMessagesQueryVariables>) {
|
||||
return Apollo.useQuery<GetMessagesQuery, GetMessagesQueryVariables>(GetMessagesDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useQuery<GetMessagesQuery, GetMessagesQueryVariables>(GetMessagesDocument, options);
|
||||
}
|
||||
export function useGetMessagesLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetMessagesQuery, GetMessagesQueryVariables>) {
|
||||
return Apollo.useLazyQuery<GetMessagesQuery, GetMessagesQueryVariables>(GetMessagesDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useLazyQuery<GetMessagesQuery, GetMessagesQueryVariables>(GetMessagesDocument, options);
|
||||
}
|
||||
export type GetMessagesQueryHookResult = ReturnType<typeof useGetMessagesQuery>;
|
||||
export type GetMessagesLazyQueryHookResult = ReturnType<typeof useGetMessagesLazyQuery>;
|
||||
|
@ -3,6 +3,7 @@ import * as Types from '../../types';
|
||||
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {}
|
||||
export type GetNetworkInfoQueryVariables = Types.Exact<{ [key: string]: never; }>;
|
||||
|
||||
|
||||
@ -46,10 +47,12 @@ export const GetNetworkInfoDocument = gql`
|
||||
* });
|
||||
*/
|
||||
export function useGetNetworkInfoQuery(baseOptions?: Apollo.QueryHookOptions<GetNetworkInfoQuery, GetNetworkInfoQueryVariables>) {
|
||||
return Apollo.useQuery<GetNetworkInfoQuery, GetNetworkInfoQueryVariables>(GetNetworkInfoDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useQuery<GetNetworkInfoQuery, GetNetworkInfoQueryVariables>(GetNetworkInfoDocument, options);
|
||||
}
|
||||
export function useGetNetworkInfoLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetNetworkInfoQuery, GetNetworkInfoQueryVariables>) {
|
||||
return Apollo.useLazyQuery<GetNetworkInfoQuery, GetNetworkInfoQueryVariables>(GetNetworkInfoDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useLazyQuery<GetNetworkInfoQuery, GetNetworkInfoQueryVariables>(GetNetworkInfoDocument, options);
|
||||
}
|
||||
export type GetNetworkInfoQueryHookResult = ReturnType<typeof useGetNetworkInfoQuery>;
|
||||
export type GetNetworkInfoLazyQueryHookResult = ReturnType<typeof useGetNetworkInfoLazyQuery>;
|
||||
|
@ -3,6 +3,7 @@ import * as Types from '../../types';
|
||||
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {}
|
||||
export type GetNodeQueryVariables = Types.Exact<{
|
||||
publicKey: Types.Scalars['String'];
|
||||
withoutChannels?: Types.Maybe<Types.Scalars['Boolean']>;
|
||||
@ -53,10 +54,12 @@ export const GetNodeDocument = gql`
|
||||
* });
|
||||
*/
|
||||
export function useGetNodeQuery(baseOptions: Apollo.QueryHookOptions<GetNodeQuery, GetNodeQueryVariables>) {
|
||||
return Apollo.useQuery<GetNodeQuery, GetNodeQueryVariables>(GetNodeDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useQuery<GetNodeQuery, GetNodeQueryVariables>(GetNodeDocument, options);
|
||||
}
|
||||
export function useGetNodeLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetNodeQuery, GetNodeQueryVariables>) {
|
||||
return Apollo.useLazyQuery<GetNodeQuery, GetNodeQueryVariables>(GetNodeDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useLazyQuery<GetNodeQuery, GetNodeQueryVariables>(GetNodeDocument, options);
|
||||
}
|
||||
export type GetNodeQueryHookResult = ReturnType<typeof useGetNodeQuery>;
|
||||
export type GetNodeLazyQueryHookResult = ReturnType<typeof useGetNodeLazyQuery>;
|
||||
|
@ -3,6 +3,7 @@ import * as Types from '../../types';
|
||||
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {}
|
||||
export type GetCanConnectQueryVariables = Types.Exact<{ [key: string]: never; }>;
|
||||
|
||||
|
||||
@ -84,10 +85,12 @@ export const GetCanConnectDocument = gql`
|
||||
* });
|
||||
*/
|
||||
export function useGetCanConnectQuery(baseOptions?: Apollo.QueryHookOptions<GetCanConnectQuery, GetCanConnectQueryVariables>) {
|
||||
return Apollo.useQuery<GetCanConnectQuery, GetCanConnectQueryVariables>(GetCanConnectDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useQuery<GetCanConnectQuery, GetCanConnectQueryVariables>(GetCanConnectDocument, options);
|
||||
}
|
||||
export function useGetCanConnectLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetCanConnectQuery, GetCanConnectQueryVariables>) {
|
||||
return Apollo.useLazyQuery<GetCanConnectQuery, GetCanConnectQueryVariables>(GetCanConnectDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useLazyQuery<GetCanConnectQuery, GetCanConnectQueryVariables>(GetCanConnectDocument, options);
|
||||
}
|
||||
export type GetCanConnectQueryHookResult = ReturnType<typeof useGetCanConnectQuery>;
|
||||
export type GetCanConnectLazyQueryHookResult = ReturnType<typeof useGetCanConnectLazyQuery>;
|
||||
@ -131,10 +134,12 @@ export const GetNodeInfoDocument = gql`
|
||||
* });
|
||||
*/
|
||||
export function useGetNodeInfoQuery(baseOptions?: Apollo.QueryHookOptions<GetNodeInfoQuery, GetNodeInfoQueryVariables>) {
|
||||
return Apollo.useQuery<GetNodeInfoQuery, GetNodeInfoQueryVariables>(GetNodeInfoDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useQuery<GetNodeInfoQuery, GetNodeInfoQueryVariables>(GetNodeInfoDocument, options);
|
||||
}
|
||||
export function useGetNodeInfoLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetNodeInfoQuery, GetNodeInfoQueryVariables>) {
|
||||
return Apollo.useLazyQuery<GetNodeInfoQuery, GetNodeInfoQueryVariables>(GetNodeInfoDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useLazyQuery<GetNodeInfoQuery, GetNodeInfoQueryVariables>(GetNodeInfoDocument, options);
|
||||
}
|
||||
export type GetNodeInfoQueryHookResult = ReturnType<typeof useGetNodeInfoQuery>;
|
||||
export type GetNodeInfoLazyQueryHookResult = ReturnType<typeof useGetNodeInfoLazyQuery>;
|
||||
@ -165,10 +170,12 @@ export const GetChannelAmountInfoDocument = gql`
|
||||
* });
|
||||
*/
|
||||
export function useGetChannelAmountInfoQuery(baseOptions?: Apollo.QueryHookOptions<GetChannelAmountInfoQuery, GetChannelAmountInfoQueryVariables>) {
|
||||
return Apollo.useQuery<GetChannelAmountInfoQuery, GetChannelAmountInfoQueryVariables>(GetChannelAmountInfoDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useQuery<GetChannelAmountInfoQuery, GetChannelAmountInfoQueryVariables>(GetChannelAmountInfoDocument, options);
|
||||
}
|
||||
export function useGetChannelAmountInfoLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetChannelAmountInfoQuery, GetChannelAmountInfoQueryVariables>) {
|
||||
return Apollo.useLazyQuery<GetChannelAmountInfoQuery, GetChannelAmountInfoQueryVariables>(GetChannelAmountInfoDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useLazyQuery<GetChannelAmountInfoQuery, GetChannelAmountInfoQueryVariables>(GetChannelAmountInfoDocument, options);
|
||||
}
|
||||
export type GetChannelAmountInfoQueryHookResult = ReturnType<typeof useGetChannelAmountInfoQuery>;
|
||||
export type GetChannelAmountInfoLazyQueryHookResult = ReturnType<typeof useGetChannelAmountInfoLazyQuery>;
|
||||
@ -199,10 +206,12 @@ export const GetCanConnectInfoDocument = gql`
|
||||
* });
|
||||
*/
|
||||
export function useGetCanConnectInfoQuery(baseOptions?: Apollo.QueryHookOptions<GetCanConnectInfoQuery, GetCanConnectInfoQueryVariables>) {
|
||||
return Apollo.useQuery<GetCanConnectInfoQuery, GetCanConnectInfoQueryVariables>(GetCanConnectInfoDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useQuery<GetCanConnectInfoQuery, GetCanConnectInfoQueryVariables>(GetCanConnectInfoDocument, options);
|
||||
}
|
||||
export function useGetCanConnectInfoLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetCanConnectInfoQuery, GetCanConnectInfoQueryVariables>) {
|
||||
return Apollo.useLazyQuery<GetCanConnectInfoQuery, GetCanConnectInfoQueryVariables>(GetCanConnectInfoDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useLazyQuery<GetCanConnectInfoQuery, GetCanConnectInfoQueryVariables>(GetCanConnectInfoDocument, options);
|
||||
}
|
||||
export type GetCanConnectInfoQueryHookResult = ReturnType<typeof useGetCanConnectInfoQuery>;
|
||||
export type GetCanConnectInfoLazyQueryHookResult = ReturnType<typeof useGetCanConnectInfoLazyQuery>;
|
||||
|
@ -3,6 +3,7 @@ import * as Types from '../../types';
|
||||
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {}
|
||||
export type GetPeersQueryVariables = Types.Exact<{ [key: string]: never; }>;
|
||||
|
||||
|
||||
@ -63,10 +64,12 @@ export const GetPeersDocument = gql`
|
||||
* });
|
||||
*/
|
||||
export function useGetPeersQuery(baseOptions?: Apollo.QueryHookOptions<GetPeersQuery, GetPeersQueryVariables>) {
|
||||
return Apollo.useQuery<GetPeersQuery, GetPeersQueryVariables>(GetPeersDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useQuery<GetPeersQuery, GetPeersQueryVariables>(GetPeersDocument, options);
|
||||
}
|
||||
export function useGetPeersLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetPeersQuery, GetPeersQueryVariables>) {
|
||||
return Apollo.useLazyQuery<GetPeersQuery, GetPeersQueryVariables>(GetPeersDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useLazyQuery<GetPeersQuery, GetPeersQueryVariables>(GetPeersDocument, options);
|
||||
}
|
||||
export type GetPeersQueryHookResult = ReturnType<typeof useGetPeersQuery>;
|
||||
export type GetPeersLazyQueryHookResult = ReturnType<typeof useGetPeersLazyQuery>;
|
||||
|
@ -3,6 +3,7 @@ import * as Types from '../../types';
|
||||
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {}
|
||||
export type GetPendingChannelsQueryVariables = Types.Exact<{ [key: string]: never; }>;
|
||||
|
||||
|
||||
@ -68,10 +69,12 @@ export const GetPendingChannelsDocument = gql`
|
||||
* });
|
||||
*/
|
||||
export function useGetPendingChannelsQuery(baseOptions?: Apollo.QueryHookOptions<GetPendingChannelsQuery, GetPendingChannelsQueryVariables>) {
|
||||
return Apollo.useQuery<GetPendingChannelsQuery, GetPendingChannelsQueryVariables>(GetPendingChannelsDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useQuery<GetPendingChannelsQuery, GetPendingChannelsQueryVariables>(GetPendingChannelsDocument, options);
|
||||
}
|
||||
export function useGetPendingChannelsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetPendingChannelsQuery, GetPendingChannelsQueryVariables>) {
|
||||
return Apollo.useLazyQuery<GetPendingChannelsQuery, GetPendingChannelsQueryVariables>(GetPendingChannelsDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useLazyQuery<GetPendingChannelsQuery, GetPendingChannelsQueryVariables>(GetPendingChannelsDocument, options);
|
||||
}
|
||||
export type GetPendingChannelsQueryHookResult = ReturnType<typeof useGetPendingChannelsQuery>;
|
||||
export type GetPendingChannelsLazyQueryHookResult = ReturnType<typeof useGetPendingChannelsLazyQuery>;
|
||||
|
@ -3,6 +3,7 @@ import * as Types from '../../types';
|
||||
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {}
|
||||
export type GetResumeQueryVariables = Types.Exact<{
|
||||
token?: Types.Maybe<Types.Scalars['String']>;
|
||||
}>;
|
||||
@ -114,10 +115,12 @@ export const GetResumeDocument = gql`
|
||||
* });
|
||||
*/
|
||||
export function useGetResumeQuery(baseOptions?: Apollo.QueryHookOptions<GetResumeQuery, GetResumeQueryVariables>) {
|
||||
return Apollo.useQuery<GetResumeQuery, GetResumeQueryVariables>(GetResumeDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useQuery<GetResumeQuery, GetResumeQueryVariables>(GetResumeDocument, options);
|
||||
}
|
||||
export function useGetResumeLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetResumeQuery, GetResumeQueryVariables>) {
|
||||
return Apollo.useLazyQuery<GetResumeQuery, GetResumeQueryVariables>(GetResumeDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useLazyQuery<GetResumeQuery, GetResumeQueryVariables>(GetResumeDocument, options);
|
||||
}
|
||||
export type GetResumeQueryHookResult = ReturnType<typeof useGetResumeQuery>;
|
||||
export type GetResumeLazyQueryHookResult = ReturnType<typeof useGetResumeLazyQuery>;
|
||||
|
@ -3,6 +3,7 @@ import * as Types from '../../types';
|
||||
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {}
|
||||
export type GetRoutesQueryVariables = Types.Exact<{
|
||||
outgoing: Types.Scalars['String'];
|
||||
incoming: Types.Scalars['String'];
|
||||
@ -74,10 +75,12 @@ export const GetRoutesDocument = gql`
|
||||
* });
|
||||
*/
|
||||
export function useGetRoutesQuery(baseOptions: Apollo.QueryHookOptions<GetRoutesQuery, GetRoutesQueryVariables>) {
|
||||
return Apollo.useQuery<GetRoutesQuery, GetRoutesQueryVariables>(GetRoutesDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useQuery<GetRoutesQuery, GetRoutesQueryVariables>(GetRoutesDocument, options);
|
||||
}
|
||||
export function useGetRoutesLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetRoutesQuery, GetRoutesQueryVariables>) {
|
||||
return Apollo.useLazyQuery<GetRoutesQuery, GetRoutesQueryVariables>(GetRoutesDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useLazyQuery<GetRoutesQuery, GetRoutesQueryVariables>(GetRoutesDocument, options);
|
||||
}
|
||||
export type GetRoutesQueryHookResult = ReturnType<typeof useGetRoutesQuery>;
|
||||
export type GetRoutesLazyQueryHookResult = ReturnType<typeof useGetRoutesLazyQuery>;
|
||||
|
@ -3,6 +3,7 @@ import * as Types from '../../types';
|
||||
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {}
|
||||
export type GetServerAccountsQueryVariables = Types.Exact<{ [key: string]: never; }>;
|
||||
|
||||
|
||||
@ -42,10 +43,12 @@ export const GetServerAccountsDocument = gql`
|
||||
* });
|
||||
*/
|
||||
export function useGetServerAccountsQuery(baseOptions?: Apollo.QueryHookOptions<GetServerAccountsQuery, GetServerAccountsQueryVariables>) {
|
||||
return Apollo.useQuery<GetServerAccountsQuery, GetServerAccountsQueryVariables>(GetServerAccountsDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useQuery<GetServerAccountsQuery, GetServerAccountsQueryVariables>(GetServerAccountsDocument, options);
|
||||
}
|
||||
export function useGetServerAccountsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetServerAccountsQuery, GetServerAccountsQueryVariables>) {
|
||||
return Apollo.useLazyQuery<GetServerAccountsQuery, GetServerAccountsQueryVariables>(GetServerAccountsDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useLazyQuery<GetServerAccountsQuery, GetServerAccountsQueryVariables>(GetServerAccountsDocument, options);
|
||||
}
|
||||
export type GetServerAccountsQueryHookResult = ReturnType<typeof useGetServerAccountsQuery>;
|
||||
export type GetServerAccountsLazyQueryHookResult = ReturnType<typeof useGetServerAccountsLazyQuery>;
|
||||
|
@ -3,6 +3,7 @@ import * as Types from '../../types';
|
||||
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {}
|
||||
export type GetTimeHealthQueryVariables = Types.Exact<{ [key: string]: never; }>;
|
||||
|
||||
|
||||
@ -63,10 +64,12 @@ export const GetTimeHealthDocument = gql`
|
||||
* });
|
||||
*/
|
||||
export function useGetTimeHealthQuery(baseOptions?: Apollo.QueryHookOptions<GetTimeHealthQuery, GetTimeHealthQueryVariables>) {
|
||||
return Apollo.useQuery<GetTimeHealthQuery, GetTimeHealthQueryVariables>(GetTimeHealthDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useQuery<GetTimeHealthQuery, GetTimeHealthQueryVariables>(GetTimeHealthDocument, options);
|
||||
}
|
||||
export function useGetTimeHealthLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetTimeHealthQuery, GetTimeHealthQueryVariables>) {
|
||||
return Apollo.useLazyQuery<GetTimeHealthQuery, GetTimeHealthQueryVariables>(GetTimeHealthDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useLazyQuery<GetTimeHealthQuery, GetTimeHealthQueryVariables>(GetTimeHealthDocument, options);
|
||||
}
|
||||
export type GetTimeHealthQueryHookResult = ReturnType<typeof useGetTimeHealthQuery>;
|
||||
export type GetTimeHealthLazyQueryHookResult = ReturnType<typeof useGetTimeHealthLazyQuery>;
|
||||
|
@ -3,6 +3,7 @@ import * as Types from '../../types';
|
||||
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {}
|
||||
export type GetUtxosQueryVariables = Types.Exact<{ [key: string]: never; }>;
|
||||
|
||||
|
||||
@ -45,10 +46,12 @@ export const GetUtxosDocument = gql`
|
||||
* });
|
||||
*/
|
||||
export function useGetUtxosQuery(baseOptions?: Apollo.QueryHookOptions<GetUtxosQuery, GetUtxosQueryVariables>) {
|
||||
return Apollo.useQuery<GetUtxosQuery, GetUtxosQueryVariables>(GetUtxosDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useQuery<GetUtxosQuery, GetUtxosQueryVariables>(GetUtxosDocument, options);
|
||||
}
|
||||
export function useGetUtxosLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetUtxosQuery, GetUtxosQueryVariables>) {
|
||||
return Apollo.useLazyQuery<GetUtxosQuery, GetUtxosQueryVariables>(GetUtxosDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useLazyQuery<GetUtxosQuery, GetUtxosQueryVariables>(GetUtxosDocument, options);
|
||||
}
|
||||
export type GetUtxosQueryHookResult = ReturnType<typeof useGetUtxosQuery>;
|
||||
export type GetUtxosLazyQueryHookResult = ReturnType<typeof useGetUtxosLazyQuery>;
|
||||
|
@ -3,6 +3,7 @@ import * as Types from '../../types';
|
||||
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {}
|
||||
export type GetVolumeHealthQueryVariables = Types.Exact<{ [key: string]: never; }>;
|
||||
|
||||
|
||||
@ -61,10 +62,12 @@ export const GetVolumeHealthDocument = gql`
|
||||
* });
|
||||
*/
|
||||
export function useGetVolumeHealthQuery(baseOptions?: Apollo.QueryHookOptions<GetVolumeHealthQuery, GetVolumeHealthQueryVariables>) {
|
||||
return Apollo.useQuery<GetVolumeHealthQuery, GetVolumeHealthQueryVariables>(GetVolumeHealthDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useQuery<GetVolumeHealthQuery, GetVolumeHealthQueryVariables>(GetVolumeHealthDocument, options);
|
||||
}
|
||||
export function useGetVolumeHealthLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetVolumeHealthQuery, GetVolumeHealthQueryVariables>) {
|
||||
return Apollo.useLazyQuery<GetVolumeHealthQuery, GetVolumeHealthQueryVariables>(GetVolumeHealthDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useLazyQuery<GetVolumeHealthQuery, GetVolumeHealthQueryVariables>(GetVolumeHealthDocument, options);
|
||||
}
|
||||
export type GetVolumeHealthQueryHookResult = ReturnType<typeof useGetVolumeHealthQuery>;
|
||||
export type GetVolumeHealthLazyQueryHookResult = ReturnType<typeof useGetVolumeHealthLazyQuery>;
|
||||
|
@ -3,6 +3,7 @@ import * as Types from '../../types';
|
||||
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {}
|
||||
export type GetWalletInfoQueryVariables = Types.Exact<{ [key: string]: never; }>;
|
||||
|
||||
|
||||
@ -47,10 +48,12 @@ export const GetWalletInfoDocument = gql`
|
||||
* });
|
||||
*/
|
||||
export function useGetWalletInfoQuery(baseOptions?: Apollo.QueryHookOptions<GetWalletInfoQuery, GetWalletInfoQueryVariables>) {
|
||||
return Apollo.useQuery<GetWalletInfoQuery, GetWalletInfoQueryVariables>(GetWalletInfoDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useQuery<GetWalletInfoQuery, GetWalletInfoQueryVariables>(GetWalletInfoDocument, options);
|
||||
}
|
||||
export function useGetWalletInfoLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetWalletInfoQuery, GetWalletInfoQueryVariables>) {
|
||||
return Apollo.useLazyQuery<GetWalletInfoQuery, GetWalletInfoQueryVariables>(GetWalletInfoDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useLazyQuery<GetWalletInfoQuery, GetWalletInfoQueryVariables>(GetWalletInfoDocument, options);
|
||||
}
|
||||
export type GetWalletInfoQueryHookResult = ReturnType<typeof useGetWalletInfoQuery>;
|
||||
export type GetWalletInfoLazyQueryHookResult = ReturnType<typeof useGetWalletInfoLazyQuery>;
|
||||
|
@ -3,6 +3,7 @@ import * as Types from '../../types';
|
||||
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {}
|
||||
export type RecoverFundsQueryVariables = Types.Exact<{
|
||||
backup: Types.Scalars['String'];
|
||||
}>;
|
||||
@ -37,10 +38,12 @@ export const RecoverFundsDocument = gql`
|
||||
* });
|
||||
*/
|
||||
export function useRecoverFundsQuery(baseOptions: Apollo.QueryHookOptions<RecoverFundsQuery, RecoverFundsQueryVariables>) {
|
||||
return Apollo.useQuery<RecoverFundsQuery, RecoverFundsQueryVariables>(RecoverFundsDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useQuery<RecoverFundsQuery, RecoverFundsQueryVariables>(RecoverFundsDocument, options);
|
||||
}
|
||||
export function useRecoverFundsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<RecoverFundsQuery, RecoverFundsQueryVariables>) {
|
||||
return Apollo.useLazyQuery<RecoverFundsQuery, RecoverFundsQueryVariables>(RecoverFundsDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useLazyQuery<RecoverFundsQuery, RecoverFundsQueryVariables>(RecoverFundsDocument, options);
|
||||
}
|
||||
export type RecoverFundsQueryHookResult = ReturnType<typeof useRecoverFundsQuery>;
|
||||
export type RecoverFundsLazyQueryHookResult = ReturnType<typeof useRecoverFundsLazyQuery>;
|
||||
|
@ -3,6 +3,7 @@ import * as Types from '../../types';
|
||||
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {}
|
||||
export type SignMessageQueryVariables = Types.Exact<{
|
||||
message: Types.Scalars['String'];
|
||||
}>;
|
||||
@ -37,10 +38,12 @@ export const SignMessageDocument = gql`
|
||||
* });
|
||||
*/
|
||||
export function useSignMessageQuery(baseOptions: Apollo.QueryHookOptions<SignMessageQuery, SignMessageQueryVariables>) {
|
||||
return Apollo.useQuery<SignMessageQuery, SignMessageQueryVariables>(SignMessageDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useQuery<SignMessageQuery, SignMessageQueryVariables>(SignMessageDocument, options);
|
||||
}
|
||||
export function useSignMessageLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<SignMessageQuery, SignMessageQueryVariables>) {
|
||||
return Apollo.useLazyQuery<SignMessageQuery, SignMessageQueryVariables>(SignMessageDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useLazyQuery<SignMessageQuery, SignMessageQueryVariables>(SignMessageDocument, options);
|
||||
}
|
||||
export type SignMessageQueryHookResult = ReturnType<typeof useSignMessageQuery>;
|
||||
export type SignMessageLazyQueryHookResult = ReturnType<typeof useSignMessageLazyQuery>;
|
||||
|
@ -3,6 +3,7 @@ import * as Types from '../../types';
|
||||
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {}
|
||||
export type VerifyBackupsQueryVariables = Types.Exact<{
|
||||
backup: Types.Scalars['String'];
|
||||
}>;
|
||||
@ -37,10 +38,12 @@ export const VerifyBackupsDocument = gql`
|
||||
* });
|
||||
*/
|
||||
export function useVerifyBackupsQuery(baseOptions: Apollo.QueryHookOptions<VerifyBackupsQuery, VerifyBackupsQueryVariables>) {
|
||||
return Apollo.useQuery<VerifyBackupsQuery, VerifyBackupsQueryVariables>(VerifyBackupsDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useQuery<VerifyBackupsQuery, VerifyBackupsQueryVariables>(VerifyBackupsDocument, options);
|
||||
}
|
||||
export function useVerifyBackupsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<VerifyBackupsQuery, VerifyBackupsQueryVariables>) {
|
||||
return Apollo.useLazyQuery<VerifyBackupsQuery, VerifyBackupsQueryVariables>(VerifyBackupsDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useLazyQuery<VerifyBackupsQuery, VerifyBackupsQueryVariables>(VerifyBackupsDocument, options);
|
||||
}
|
||||
export type VerifyBackupsQueryHookResult = ReturnType<typeof useVerifyBackupsQuery>;
|
||||
export type VerifyBackupsLazyQueryHookResult = ReturnType<typeof useVerifyBackupsLazyQuery>;
|
||||
|
@ -3,6 +3,7 @@ import * as Types from '../../types';
|
||||
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {}
|
||||
export type VerifyMessageQueryVariables = Types.Exact<{
|
||||
message: Types.Scalars['String'];
|
||||
signature: Types.Scalars['String'];
|
||||
@ -39,10 +40,12 @@ export const VerifyMessageDocument = gql`
|
||||
* });
|
||||
*/
|
||||
export function useVerifyMessageQuery(baseOptions: Apollo.QueryHookOptions<VerifyMessageQuery, VerifyMessageQueryVariables>) {
|
||||
return Apollo.useQuery<VerifyMessageQuery, VerifyMessageQueryVariables>(VerifyMessageDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useQuery<VerifyMessageQuery, VerifyMessageQueryVariables>(VerifyMessageDocument, options);
|
||||
}
|
||||
export function useVerifyMessageLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<VerifyMessageQuery, VerifyMessageQueryVariables>) {
|
||||
return Apollo.useLazyQuery<VerifyMessageQuery, VerifyMessageQueryVariables>(VerifyMessageDocument, baseOptions);
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useLazyQuery<VerifyMessageQuery, VerifyMessageQueryVariables>(VerifyMessageDocument, options);
|
||||
}
|
||||
export type VerifyMessageQueryHookResult = ReturnType<typeof useVerifyMessageQuery>;
|
||||
export type VerifyMessageLazyQueryHookResult = ReturnType<typeof useVerifyMessageLazyQuery>;
|
||||
|
15
src/graphql/queries/getChannel.ts
Normal file
15
src/graphql/queries/getChannel.ts
Normal file
@ -0,0 +1,15 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const GET_CHANNEL = gql`
|
||||
query GetChannel($id: String!, $pubkey: String) {
|
||||
getChannel(id: $id, pubkey: $pubkey) {
|
||||
partner_node_policies {
|
||||
node {
|
||||
node {
|
||||
alias
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
15
src/graphql/queries/getForwards.ts
Normal file
15
src/graphql/queries/getForwards.ts
Normal file
@ -0,0 +1,15 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const GET_FORWARDS = gql`
|
||||
query GetForwards($days: Int!) {
|
||||
getForwards(days: $days) {
|
||||
created_at
|
||||
fee
|
||||
fee_mtokens
|
||||
incoming_channel
|
||||
mtokens
|
||||
outgoing_channel
|
||||
tokens
|
||||
}
|
||||
}
|
||||
`;
|
@ -1,25 +0,0 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const GET_FORWARDS_PAST_DAYS = gql`
|
||||
query GetForwardsPastDays($days: Int!) {
|
||||
getForwardsPastDays(days: $days) {
|
||||
created_at
|
||||
fee
|
||||
fee_mtokens
|
||||
incoming_channel
|
||||
mtokens
|
||||
outgoing_channel
|
||||
tokens
|
||||
incoming_node {
|
||||
alias
|
||||
public_key
|
||||
channel_id
|
||||
}
|
||||
outgoing_node {
|
||||
alias
|
||||
public_key
|
||||
channel_id
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
@ -60,6 +60,7 @@ export type Query = {
|
||||
getTimeHealth?: Maybe<ChannelsTimeHealth>;
|
||||
getFeeHealth?: Maybe<ChannelsFeeHealth>;
|
||||
getChannelBalance?: Maybe<ChannelBalanceType>;
|
||||
getChannel: SingleChannelType;
|
||||
getChannels: Array<Maybe<ChannelType>>;
|
||||
getClosedChannels?: Maybe<Array<Maybe<ClosedChannelType>>>;
|
||||
getPendingChannels?: Maybe<Array<Maybe<PendingChannelType>>>;
|
||||
@ -71,7 +72,7 @@ export type Query = {
|
||||
decodeRequest?: Maybe<DecodeType>;
|
||||
getWalletInfo?: Maybe<WalletInfoType>;
|
||||
getResume?: Maybe<GetResumeType>;
|
||||
getForwardsPastDays: Array<Maybe<Forward>>;
|
||||
getForwards: Array<Maybe<Forward>>;
|
||||
getBitcoinPrice?: Maybe<Scalars['String']>;
|
||||
getBitcoinFees?: Maybe<BitcoinFeeType>;
|
||||
getForwardChannelsReport?: Maybe<Scalars['String']>;
|
||||
@ -118,6 +119,12 @@ export type QueryGetAccountingReportArgs = {
|
||||
};
|
||||
|
||||
|
||||
export type QueryGetChannelArgs = {
|
||||
id: Scalars['String'];
|
||||
pubkey?: Maybe<Scalars['String']>;
|
||||
};
|
||||
|
||||
|
||||
export type QueryGetChannelsArgs = {
|
||||
active?: Maybe<Scalars['Boolean']>;
|
||||
};
|
||||
@ -144,7 +151,7 @@ export type QueryGetResumeArgs = {
|
||||
};
|
||||
|
||||
|
||||
export type QueryGetForwardsPastDaysArgs = {
|
||||
export type QueryGetForwardsArgs = {
|
||||
days: Scalars['Int'];
|
||||
};
|
||||
|
||||
@ -830,8 +837,6 @@ export type Forward = {
|
||||
mtokens: Scalars['String'];
|
||||
outgoing_channel: Scalars['String'];
|
||||
tokens: Scalars['Int'];
|
||||
incoming_node?: Maybe<ForwardNodeType>;
|
||||
outgoing_node?: Maybe<ForwardNodeType>;
|
||||
};
|
||||
|
||||
export type ForwardNodeType = {
|
||||
|
@ -6,9 +6,10 @@ import { getPrice } from 'src/components/price/Price';
|
||||
import { Table } from 'src/components/table';
|
||||
import { useConfigState } from 'src/context/ConfigContext';
|
||||
import { usePriceState } from 'src/context/PriceContext';
|
||||
import { useGetForwardsPastDaysQuery } from 'src/graphql/queries/__generated__/getForwardsPastDays.generated';
|
||||
import { useGetForwardsQuery } from 'src/graphql/queries/__generated__/getForwards.generated';
|
||||
import { Forward } from 'src/graphql/types';
|
||||
import { getErrorContent } from 'src/utils/error';
|
||||
import { ChannelAlias } from '../home/reports/forwardReport/ChannelAlias';
|
||||
import { ReportType } from '../home/reports/forwardReport/ForwardReport';
|
||||
import { sortByNode } from './helpers';
|
||||
|
||||
@ -32,7 +33,7 @@ export const ForwardTable: FC<{ days: number; order: ReportType }> = ({
|
||||
days,
|
||||
order,
|
||||
}) => {
|
||||
const { data, loading } = useGetForwardsPastDaysQuery({
|
||||
const { data, loading } = useGetForwardsQuery({
|
||||
ssr: false,
|
||||
variables: { days },
|
||||
onError: error => toast.error(getErrorContent(error)),
|
||||
@ -42,17 +43,18 @@ export const ForwardTable: FC<{ days: number; order: ReportType }> = ({
|
||||
const priceContext = usePriceState();
|
||||
const format = getPrice(currency, displayValues, priceContext);
|
||||
|
||||
if (loading || !data?.getForwardsPastDays?.length) {
|
||||
if (loading || !data?.getForwards?.length) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const { final, maxIn, maxOut } = sortByNode(
|
||||
order,
|
||||
data.getForwardsPastDays as Forward[]
|
||||
data.getForwards as Forward[]
|
||||
);
|
||||
|
||||
const columns = [
|
||||
{ Header: 'Alias', accessor: 'alias' },
|
||||
{ Header: 'Channel', accessor: 'channel' },
|
||||
{ Header: 'Incoming', accessor: 'incoming' },
|
||||
{ Header: 'Outgoing', accessor: 'outgoing' },
|
||||
{ Header: 'Incoming', accessor: 'incomingBar' },
|
||||
@ -61,6 +63,7 @@ export const ForwardTable: FC<{ days: number; order: ReportType }> = ({
|
||||
|
||||
const tableData = final.map(f => ({
|
||||
...f,
|
||||
alias: <ChannelAlias id={f.channel} />,
|
||||
incoming: format({ amount: f.incoming, noUnit: order === 'amount' }),
|
||||
outgoing: format({ amount: f.outgoing, noUnit: order === 'amount' }),
|
||||
incomingBar: <SingleBar value={getBar(f.incoming, maxIn)} height={16} />,
|
||||
|
@ -14,6 +14,7 @@ import {
|
||||
renderLine,
|
||||
} from '../../components/generic/helpers';
|
||||
import { Price } from '../../components/price/Price';
|
||||
import { ChannelAlias } from '../home/reports/forwardReport/ChannelAlias';
|
||||
|
||||
interface ForwardCardProps {
|
||||
forward: Forward;
|
||||
@ -35,15 +36,13 @@ export const ForwardCard = ({
|
||||
incoming_channel,
|
||||
outgoing_channel,
|
||||
tokens,
|
||||
incoming_node,
|
||||
outgoing_node,
|
||||
} = forward;
|
||||
|
||||
const formatAmount = <Price amount={tokens} />;
|
||||
const formatFee = <Price amount={fee} />;
|
||||
|
||||
const incoming_name = incoming_node?.alias || incoming_channel;
|
||||
const outgoing_name = outgoing_node?.alias || outgoing_channel;
|
||||
const incoming_name = <ChannelAlias id={incoming_channel} />;
|
||||
const outgoing_name = <ChannelAlias id={outgoing_channel} />;
|
||||
|
||||
const handleClick = () => {
|
||||
if (indexOpen === index) {
|
||||
|
@ -1,5 +1,4 @@
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import { useGetForwardsPastDaysQuery } from 'src/graphql/queries/__generated__/getForwardsPastDays.generated';
|
||||
import { toast } from 'react-toastify';
|
||||
import { getErrorContent } from 'src/utils/error';
|
||||
import { Forward } from 'src/graphql/types';
|
||||
@ -18,6 +17,8 @@ import { getPrice } from 'src/components/price/Price';
|
||||
import { useConfigState } from 'src/context/ConfigContext';
|
||||
import { ReportType } from '../home/reports/forwardReport/ForwardReport';
|
||||
import { getChordMatrix } from './helpers';
|
||||
import { useGetForwardsQuery } from 'src/graphql/queries/__generated__/getForwards.generated';
|
||||
import { ChannelAlias } from '../home/reports/forwardReport/ChannelAlias';
|
||||
|
||||
const Wrapper = styled.div`
|
||||
height: 800px;
|
||||
@ -62,7 +63,7 @@ export const ForwardChord = ({
|
||||
setSelected(null);
|
||||
}, [order]);
|
||||
|
||||
const { data, loading } = useGetForwardsPastDaysQuery({
|
||||
const { data, loading } = useGetForwardsQuery({
|
||||
ssr: false,
|
||||
variables: { days },
|
||||
onError: error => toast.error(getErrorContent(error)),
|
||||
@ -72,13 +73,13 @@ export const ForwardChord = ({
|
||||
const priceContext = usePriceState();
|
||||
const format = getPrice(currency, displayValues, priceContext);
|
||||
|
||||
if (loading || !data?.getForwardsPastDays?.length) {
|
||||
if (loading || !data?.getForwards?.length) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const { matrix, uniqueNodes } = getChordMatrix(
|
||||
order,
|
||||
data.getForwardsPastDays as Forward[]
|
||||
data.getForwards as Forward[]
|
||||
);
|
||||
|
||||
const handleGroupClick = (group: SingleGroupProps) => {
|
||||
@ -99,7 +100,11 @@ export const ForwardChord = ({
|
||||
if (selected.type === 'group') {
|
||||
return (
|
||||
<>
|
||||
{renderLine('Node', uniqueNodes[selected.group.index])}
|
||||
{renderLine(
|
||||
'With',
|
||||
<ChannelAlias id={uniqueNodes[selected.group.index]} />
|
||||
)}
|
||||
{renderLine('Channel Id', uniqueNodes[selected.group.index])}
|
||||
{renderLine(
|
||||
getTitle(order),
|
||||
format({ amount: selected.group.value, noUnit: order === 'amount' })
|
||||
@ -111,7 +116,15 @@ export const ForwardChord = ({
|
||||
return (
|
||||
<>
|
||||
{renderLine(
|
||||
'Flow between',
|
||||
'Between',
|
||||
<>
|
||||
<ChannelAlias id={uniqueNodes[selected.chord.source.index]} />
|
||||
{` - `}
|
||||
<ChannelAlias id={uniqueNodes[selected.chord.target.index]} />
|
||||
</>
|
||||
)}
|
||||
{renderLine(
|
||||
'Channel Ids',
|
||||
`${uniqueNodes[selected.chord.source.index]} - ${
|
||||
uniqueNodes[selected.chord.target.index]
|
||||
}`
|
||||
|
@ -13,14 +13,14 @@ export const getChordMatrix = (order: ReportType, forwardArray: Forward[]) => {
|
||||
}
|
||||
|
||||
return {
|
||||
aliasIn: f.incoming_node?.alias || 'Unknown',
|
||||
aliasOut: f.outgoing_node?.alias || 'Unknown',
|
||||
incoming_channel: f.incoming_channel,
|
||||
outgoing_channel: f.outgoing_channel,
|
||||
value,
|
||||
};
|
||||
});
|
||||
|
||||
const incomingNodes = cleaned.map(f => f.aliasIn);
|
||||
const outgoingNodes = cleaned.map(f => f.aliasOut);
|
||||
const incomingNodes = cleaned.map(f => f.incoming_channel);
|
||||
const outgoingNodes = cleaned.map(f => f.outgoing_channel);
|
||||
|
||||
const uniqueNodes = [...new Set(incomingNodes), ...new Set(outgoingNodes)];
|
||||
const nodeLength = uniqueNodes.length;
|
||||
@ -32,8 +32,8 @@ export const getChordMatrix = (order: ReportType, forwardArray: Forward[]) => {
|
||||
}
|
||||
|
||||
cleaned.forEach(f => {
|
||||
const inIndex = uniqueNodes.indexOf(f.aliasIn);
|
||||
const outIndex = uniqueNodes.indexOf(f.aliasOut);
|
||||
const inIndex = uniqueNodes.indexOf(f.incoming_channel);
|
||||
const outIndex = uniqueNodes.indexOf(f.outgoing_channel);
|
||||
|
||||
const previousValue = matrix[inIndex][outIndex];
|
||||
const previousOutValue = matrix[outIndex][inIndex];
|
||||
@ -56,14 +56,14 @@ export const sortByNode = (order: ReportType, forwardArray: Forward[]) => {
|
||||
}
|
||||
|
||||
return {
|
||||
aliasIn: f.incoming_node?.alias || 'Unknown',
|
||||
aliasOut: f.outgoing_node?.alias || 'Unknown',
|
||||
incoming_channel: f.incoming_channel,
|
||||
outgoing_channel: f.outgoing_channel,
|
||||
value,
|
||||
};
|
||||
});
|
||||
|
||||
const incomingNodes = cleaned.map(f => f.aliasIn);
|
||||
const outgoingNodes = cleaned.map(f => f.aliasOut);
|
||||
const incomingNodes = cleaned.map(f => f.incoming_channel);
|
||||
const outgoingNodes = cleaned.map(f => f.outgoing_channel);
|
||||
|
||||
const uniqueNodes = [...new Set(incomingNodes), ...new Set(outgoingNodes)];
|
||||
const nodeLength = uniqueNodes.length;
|
||||
@ -72,8 +72,8 @@ export const sortByNode = (order: ReportType, forwardArray: Forward[]) => {
|
||||
const outgoing = new Array(nodeLength).fill(0);
|
||||
|
||||
cleaned.forEach(f => {
|
||||
const inIndex = uniqueNodes.indexOf(f.aliasIn);
|
||||
const outIndex = uniqueNodes.indexOf(f.aliasOut);
|
||||
const inIndex = uniqueNodes.indexOf(f.incoming_channel);
|
||||
const outIndex = uniqueNodes.indexOf(f.outgoing_channel);
|
||||
|
||||
const currentIncoming = incoming[inIndex];
|
||||
const currentOutgoing = outgoing[outIndex];
|
||||
@ -93,7 +93,7 @@ export const sortByNode = (order: ReportType, forwardArray: Forward[]) => {
|
||||
maxOut = Math.max(maxOut, outgoingValue);
|
||||
|
||||
return {
|
||||
alias: n,
|
||||
channel: n,
|
||||
incoming: incomingValue,
|
||||
outgoing: outgoingValue,
|
||||
};
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { FC, useState } from 'react';
|
||||
import { toast } from 'react-toastify';
|
||||
import { LoadingCard } from 'src/components/loading/LoadingCard';
|
||||
import { useGetForwardsPastDaysQuery } from 'src/graphql/queries/__generated__/getForwardsPastDays.generated';
|
||||
import { useGetForwardsQuery } from 'src/graphql/queries/__generated__/getForwards.generated';
|
||||
import { Forward } from 'src/graphql/types';
|
||||
import { getErrorContent } from 'src/utils/error';
|
||||
import { ForwardCard } from './ForwardsCard';
|
||||
@ -13,7 +13,7 @@ type ForwardProps = {
|
||||
export const ForwardsList: FC<ForwardProps> = ({ days }) => {
|
||||
const [indexOpen, setIndexOpen] = useState<number>(0);
|
||||
|
||||
const { loading, data } = useGetForwardsPastDaysQuery({
|
||||
const { loading, data } = useGetForwardsQuery({
|
||||
variables: { days },
|
||||
onError: error => toast.error(getErrorContent(error)),
|
||||
});
|
||||
@ -22,7 +22,7 @@ export const ForwardsList: FC<ForwardProps> = ({ days }) => {
|
||||
return <LoadingCard noCard={true} />;
|
||||
}
|
||||
|
||||
if (!data?.getForwardsPastDays?.length) {
|
||||
if (!data?.getForwards?.length) {
|
||||
return (
|
||||
<p>{`Your node has not forwarded any payments in the past ${days} ${
|
||||
days > 1 ? 'days' : 'day'
|
||||
@ -32,7 +32,7 @@ export const ForwardsList: FC<ForwardProps> = ({ days }) => {
|
||||
|
||||
return (
|
||||
<>
|
||||
{data?.getForwardsPastDays?.map((forward, index) => (
|
||||
{data?.getForwards?.map((forward, index) => (
|
||||
<ForwardCard
|
||||
forward={forward as Forward}
|
||||
key={index}
|
||||
|
68
src/views/home/reports/forwardReport/ChannelAlias.tsx
Normal file
68
src/views/home/reports/forwardReport/ChannelAlias.tsx
Normal file
@ -0,0 +1,68 @@
|
||||
import { FC } from 'react';
|
||||
import ScaleLoader from 'react-spinners/ScaleLoader';
|
||||
import { useGetChannelQuery } from 'src/graphql/queries/__generated__/getChannel.generated';
|
||||
import { useGetClosedChannelsQuery } from 'src/graphql/queries/__generated__/getClosedChannels.generated';
|
||||
import { useNodeInfo } from 'src/hooks/UseNodeInfo';
|
||||
import { themeColors } from 'src/styles/Themes';
|
||||
import { getAliasFromClosedChannels } from './helpers';
|
||||
import ReactTooltip from 'react-tooltip';
|
||||
import { Info } from 'react-feather';
|
||||
import styled from 'styled-components';
|
||||
|
||||
const S = {
|
||||
icon: styled.span`
|
||||
margin-left: 4px;
|
||||
`,
|
||||
};
|
||||
|
||||
export const ChannelAlias: FC<{ id: string }> = ({ id }) => {
|
||||
const { publicKey } = useNodeInfo();
|
||||
|
||||
const { data: closedChannelData } = useGetClosedChannelsQuery({
|
||||
skip: !id || !publicKey,
|
||||
errorPolicy: 'ignore',
|
||||
});
|
||||
|
||||
const { data, loading } = useGetChannelQuery({
|
||||
skip: !id || !publicKey,
|
||||
errorPolicy: 'ignore',
|
||||
variables: { id, pubkey: publicKey },
|
||||
});
|
||||
|
||||
if (!id || !publicKey) {
|
||||
return <>Unknown</>;
|
||||
}
|
||||
|
||||
if (loading) {
|
||||
return <ScaleLoader height={8} color={themeColors.blue3} />;
|
||||
}
|
||||
|
||||
if (data?.getChannel.partner_node_policies?.node?.node.alias) {
|
||||
return <>{data.getChannel.partner_node_policies.node.node.alias}</>;
|
||||
}
|
||||
|
||||
if (closedChannelData?.getClosedChannels?.length) {
|
||||
const { alias: closedAlias, closed } = getAliasFromClosedChannels(
|
||||
id,
|
||||
closedChannelData.getClosedChannels
|
||||
);
|
||||
|
||||
if (closed) {
|
||||
return (
|
||||
<>
|
||||
{closedAlias}
|
||||
<S.icon>
|
||||
<Info size={16} data-tip data-for={'channel_info'} />
|
||||
</S.icon>
|
||||
<ReactTooltip id={'channel_info'} effect={'solid'} place={'right'}>
|
||||
This channel has been closed.
|
||||
</ReactTooltip>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
return <>{closedAlias}</>;
|
||||
}
|
||||
|
||||
return <>Unknown</>;
|
||||
};
|
@ -5,7 +5,6 @@ import {
|
||||
MultiButton,
|
||||
SingleButton,
|
||||
} from 'src/components/buttons/multiButton/MultiButton';
|
||||
import { useGetForwardsPastDaysQuery } from 'src/graphql/queries/__generated__/getForwardsPastDays.generated';
|
||||
import { Forward } from 'src/graphql/types';
|
||||
import styled from 'styled-components';
|
||||
import { getErrorContent } from '../../../../utils/error';
|
||||
@ -13,31 +12,20 @@ import { SingleLine, SubTitle } from '../../../../components/generic/Styled';
|
||||
import { LoadingCard } from '../../../../components/loading/LoadingCard';
|
||||
import { ReportType } from './ForwardReport';
|
||||
import { orderForwardChannels } from './helpers';
|
||||
import { ChannelTable, RouteTable } from './ForwardReportTables';
|
||||
import {
|
||||
ChannelTable,
|
||||
RouteTable,
|
||||
RouteType,
|
||||
ChannelType,
|
||||
} from './ForwardReportTables';
|
||||
import { CardContent } from '.';
|
||||
import { useGetForwardsQuery } from 'src/graphql/queries/__generated__/getForwards.generated';
|
||||
|
||||
type Props = {
|
||||
days: number;
|
||||
order: ReportType;
|
||||
};
|
||||
|
||||
type ParsedRouteType = {
|
||||
route: string;
|
||||
aliasIn: string;
|
||||
aliasOut: string;
|
||||
fee: number;
|
||||
tokens: number;
|
||||
amount: number;
|
||||
};
|
||||
|
||||
type ParsedChannelType = {
|
||||
alias: string;
|
||||
name: string;
|
||||
fee: number;
|
||||
tokens: number;
|
||||
amount: number;
|
||||
};
|
||||
|
||||
const Spacing = styled.div`
|
||||
margin-bottom: 16px;
|
||||
`;
|
||||
@ -45,37 +33,31 @@ const Spacing = styled.div`
|
||||
export const ForwardChannelsReport = ({ days, order }: Props) => {
|
||||
const [type, setType] = useState<'route' | 'incoming' | 'outgoing'>('route');
|
||||
|
||||
const { data, loading } = useGetForwardsPastDaysQuery({
|
||||
const { data, loading } = useGetForwardsQuery({
|
||||
ssr: false,
|
||||
variables: { days },
|
||||
onError: error => toast.error(getErrorContent(error)),
|
||||
});
|
||||
|
||||
if (!data || loading) {
|
||||
if (!data?.getForwards || loading) {
|
||||
return <LoadingCard noCard={true} title={'Forward Report'} />;
|
||||
}
|
||||
|
||||
const forwardArray = orderForwardChannels(
|
||||
type,
|
||||
order,
|
||||
data.getForwardsPastDays as Forward[]
|
||||
data.getForwards as Forward[]
|
||||
);
|
||||
|
||||
const renderContent = (parsed: (ParsedChannelType | ParsedRouteType)[]) => {
|
||||
const renderContent = (parsed: (ChannelType | RouteType)[]) => {
|
||||
switch (type) {
|
||||
case 'route':
|
||||
return (
|
||||
<RouteTable
|
||||
order={order}
|
||||
forwardArray={parsed as ParsedRouteType[]}
|
||||
/>
|
||||
<RouteTable order={order} forwardArray={parsed as RouteType[]} />
|
||||
);
|
||||
default:
|
||||
return (
|
||||
<ChannelTable
|
||||
order={order}
|
||||
forwardArray={parsed as ParsedChannelType[]}
|
||||
/>
|
||||
<ChannelTable order={order} forwardArray={parsed as ChannelType[]} />
|
||||
);
|
||||
}
|
||||
};
|
||||
|
@ -9,7 +9,6 @@ import {
|
||||
} from 'victory';
|
||||
import { toast } from 'react-toastify';
|
||||
import { renderLine } from 'src/components/generic/helpers';
|
||||
import { useGetForwardsPastDaysQuery } from 'src/graphql/queries/__generated__/getForwardsPastDays.generated';
|
||||
import { Forward } from 'src/graphql/types';
|
||||
import {
|
||||
chartAxisColor,
|
||||
@ -23,6 +22,7 @@ import { getPrice } from '../../../../components/price/Price';
|
||||
import { usePriceState } from '../../../../context/PriceContext';
|
||||
import { orderAndReducedArray } from './helpers';
|
||||
import { CardContent } from '.';
|
||||
import { useGetForwardsQuery } from 'src/graphql/queries/__generated__/getForwards.generated';
|
||||
|
||||
export type ReportDuration =
|
||||
| 'day'
|
||||
@ -44,7 +44,7 @@ export const ForwardReport = ({ days, order }: Props) => {
|
||||
const priceContext = usePriceState();
|
||||
const format = getPrice(currency, displayValues, priceContext);
|
||||
|
||||
const { data, loading } = useGetForwardsPastDaysQuery({
|
||||
const { data, loading } = useGetForwardsQuery({
|
||||
ssr: false,
|
||||
variables: { days },
|
||||
onError: error => toast.error(getErrorContent(error)),
|
||||
@ -78,17 +78,14 @@ export const ForwardReport = ({ days, order }: Props) => {
|
||||
return format({ amount: value });
|
||||
};
|
||||
|
||||
const reduced = orderAndReducedArray(
|
||||
days,
|
||||
data.getForwardsPastDays as Forward[]
|
||||
);
|
||||
const reduced = orderAndReducedArray(days, data.getForwards as Forward[]);
|
||||
|
||||
const total = getLabelString(
|
||||
reduced.map(x => x[order]).reduce((a, c) => a + c, 0)
|
||||
);
|
||||
|
||||
const renderContent = () => {
|
||||
if (data.getForwardsPastDays.length <= 0) {
|
||||
if (data.getForwards.length <= 0) {
|
||||
return (
|
||||
<p>{`Your node has not forwarded any payments in the past ${days} ${
|
||||
days > 1 ? 'days' : 'day'
|
||||
|
@ -1,18 +1,19 @@
|
||||
import { FC } from 'react';
|
||||
import { Table } from 'src/components/table';
|
||||
import { ChannelAlias } from './ChannelAlias';
|
||||
import { ReportType } from './ForwardReport';
|
||||
|
||||
type RouteType = {
|
||||
export type RouteType = {
|
||||
route: string;
|
||||
aliasIn: string;
|
||||
aliasOut: string;
|
||||
incoming_channel: string;
|
||||
outgoing_channel: string;
|
||||
fee: number;
|
||||
tokens: number;
|
||||
amount: number;
|
||||
};
|
||||
|
||||
type ChannelType = {
|
||||
alias: string;
|
||||
export type ChannelType = {
|
||||
channelId: string;
|
||||
name: string;
|
||||
fee: number;
|
||||
tokens: number;
|
||||
@ -58,7 +59,13 @@ export const RouteTable: FC<RouteTableProps> = ({ order, forwardArray }) => {
|
||||
{ Header: getTitle(), accessor: getAccesor() },
|
||||
];
|
||||
|
||||
return <Table tableData={forwardArray} tableColumns={columns} />;
|
||||
const tableData = forwardArray.map(f => ({
|
||||
...f,
|
||||
aliasIn: <ChannelAlias id={f.incoming_channel} />,
|
||||
aliasOut: <ChannelAlias id={f.outgoing_channel} />,
|
||||
}));
|
||||
|
||||
return <Table tableData={tableData} tableColumns={columns} />;
|
||||
};
|
||||
|
||||
export const ChannelTable: FC<ChannelTableProps> = ({
|
||||
@ -93,5 +100,10 @@ export const ChannelTable: FC<ChannelTableProps> = ({
|
||||
{ Header: getTitle(), accessor: getAccesor() },
|
||||
];
|
||||
|
||||
return <Table tableData={forwardArray} tableColumns={columns} />;
|
||||
const tableData = forwardArray.map(f => ({
|
||||
...f,
|
||||
alias: <ChannelAlias id={f.channelId} />,
|
||||
}));
|
||||
|
||||
return <Table tableData={tableData} tableColumns={columns} />;
|
||||
};
|
||||
|
@ -1,6 +1,7 @@
|
||||
import { differenceInCalendarDays, differenceInHours, subDays } from 'date-fns';
|
||||
import groupBy from 'lodash.groupby';
|
||||
import sortBy from 'lodash.sortby';
|
||||
import { GetClosedChannelsQuery } from 'src/graphql/queries/__generated__/getClosedChannels.generated';
|
||||
import { Forward } from 'src/graphql/types';
|
||||
|
||||
type ListProps = {
|
||||
@ -77,8 +78,8 @@ const countRoutes = (list: Forward[]) => {
|
||||
.reduce((p: number, c: number) => p + c);
|
||||
|
||||
channelInfo.push({
|
||||
aliasIn: element[0].incoming_node?.alias || 'Unknown',
|
||||
aliasOut: element[0].outgoing_node?.alias || 'Unknown',
|
||||
incoming_channel: element[0].incoming_channel,
|
||||
outgoing_channel: element[0].outgoing_channel,
|
||||
route: key,
|
||||
amount: element.length,
|
||||
fee,
|
||||
@ -107,12 +108,12 @@ const countArray = (list: Forward[], type: boolean) => {
|
||||
.map(forward => forward.tokens)
|
||||
.reduce((p: number, c: number) => p + c);
|
||||
|
||||
const alias = type
|
||||
? element[0].incoming_node?.alias || 'Unknown'
|
||||
: element[0].outgoing_node?.alias || 'Unknown';
|
||||
const channelId = type
|
||||
? element[0].incoming_channel
|
||||
: element[0].outgoing_channel;
|
||||
|
||||
channelInfo.push({
|
||||
alias,
|
||||
channelId,
|
||||
name: key,
|
||||
amount: element.length,
|
||||
fee,
|
||||
@ -150,3 +151,18 @@ export const orderForwardChannels = (
|
||||
const sortedOutCount = sortBy(outgoingCount, order).reverse().slice(0, 10);
|
||||
return sortedOutCount;
|
||||
};
|
||||
|
||||
export const getAliasFromClosedChannels = (
|
||||
channelId: string,
|
||||
channels: GetClosedChannelsQuery['getClosedChannels']
|
||||
): { alias: string; closed: boolean } => {
|
||||
if (!channels) return { alias: 'Unknown', closed: false };
|
||||
|
||||
const channel = channels.find(c => c?.id === channelId);
|
||||
|
||||
if (channel?.partner_node_info.node.alias) {
|
||||
return { alias: channel.partner_node_info.node.alias, closed: true };
|
||||
}
|
||||
|
||||
return { alias: 'Unknown', closed: false };
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user