stacker.news/fragments/wallet.js

65 lines
1.2 KiB
JavaScript
Raw Normal View History

2021-10-26 20:49:37 +00:00
import { gql } from '@apollo/client'
2023-02-04 00:08:08 +00:00
import { ITEM_FULL_FIELDS } from './items'
2021-10-26 20:49:37 +00:00
export const INVOICE = gql`
query Invoice($id: ID!) {
invoice(id: $id) {
id
bolt11
2022-11-15 20:51:55 +00:00
satsReceived
2021-10-26 20:49:37 +00:00
cancelled
confirmedAt
expiresAt
}
}`
export const WITHDRAWL = gql`
query Withdrawl($id: ID!) {
withdrawl(id: $id) {
id
bolt11
satsPaid
satsFeePaying
satsFeePaid
status
}
}`
2021-10-28 19:59:53 +00:00
2021-12-15 16:50:11 +00:00
export const WALLET_HISTORY = gql`
2023-02-04 00:08:08 +00:00
${ITEM_FULL_FIELDS}
2021-12-16 20:02:17 +00:00
2021-12-16 17:27:12 +00:00
query WalletHistory($cursor: String, $inc: String) {
walletHistory(cursor: $cursor, inc: $inc) {
2021-12-15 16:50:11 +00:00
facts {
id
2021-12-16 17:27:12 +00:00
factId
2021-12-15 16:50:11 +00:00
type
createdAt
2022-11-15 20:51:55 +00:00
sats
satsFee
2021-12-15 16:50:11 +00:00
status
type
description
2021-12-16 20:02:17 +00:00
item {
2023-02-04 00:08:08 +00:00
...ItemFullFields
2021-12-16 20:02:17 +00:00
}
2021-12-15 16:50:11 +00:00
}
cursor
}
}
`
2021-10-28 19:59:53 +00:00
export const CREATE_WITHDRAWL = gql`
mutation createWithdrawl($invoice: String!, $maxFee: Int!) {
createWithdrawl(invoice: $invoice, maxFee: $maxFee) {
id
}
}`
2022-01-23 17:21:55 +00:00
export const SEND_TO_LNADDR = gql`
mutation sendToLnAddr($addr: String!, $amount: Int!, $maxFee: Int!) {
sendToLnAddr(addr: $addr, amount: $amount, maxFee: $maxFee) {
id
}
}`