2023-07-23 15:08:43 +00:00
|
|
|
import { gql } from 'graphql-tag'
|
2021-04-30 21:42:51 +00:00
|
|
|
|
|
|
|
export default gql`
|
|
|
|
extend type Query {
|
2021-05-11 15:52:50 +00:00
|
|
|
invoice(id: ID!): Invoice!
|
2021-05-13 01:51:37 +00:00
|
|
|
withdrawl(id: ID!): Withdrawl!
|
2021-06-02 23:15:28 +00:00
|
|
|
connectAddress: String!
|
2021-12-16 17:27:12 +00:00
|
|
|
walletHistory(cursor: String, inc: String): History
|
2021-04-30 21:42:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
extend type Mutation {
|
2021-05-11 15:52:50 +00:00
|
|
|
createInvoice(amount: Int!): Invoice!
|
2021-05-13 01:51:37 +00:00
|
|
|
createWithdrawl(invoice: String!, maxFee: Int!): Withdrawl!
|
2022-01-23 17:21:55 +00:00
|
|
|
sendToLnAddr(addr: String!, amount: Int!, maxFee: Int!): Withdrawl!
|
|
|
|
}
|
|
|
|
|
2021-05-11 15:52:50 +00:00
|
|
|
type Invoice {
|
|
|
|
id: ID!
|
2023-07-27 00:18:42 +00:00
|
|
|
createdAt: Date!
|
2023-07-20 14:55:28 +00:00
|
|
|
hash: String!
|
2021-05-11 15:52:50 +00:00
|
|
|
bolt11: String!
|
2023-07-27 00:18:42 +00:00
|
|
|
expiresAt: Date!
|
2021-05-11 15:52:50 +00:00
|
|
|
cancelled: Boolean!
|
2023-07-27 00:18:42 +00:00
|
|
|
confirmedAt: Date
|
2022-11-15 20:51:55 +00:00
|
|
|
satsReceived: Int
|
2021-04-30 21:42:51 +00:00
|
|
|
}
|
2021-05-13 01:51:37 +00:00
|
|
|
|
|
|
|
type Withdrawl {
|
|
|
|
id: ID!
|
2023-07-27 00:18:42 +00:00
|
|
|
createdAt: Date!
|
2021-05-13 01:51:37 +00:00
|
|
|
hash: String!
|
|
|
|
bolt11: String!
|
2021-05-13 21:19:51 +00:00
|
|
|
satsPaying: Int!
|
|
|
|
satsPaid: Int
|
|
|
|
satsFeePaying: Int!
|
|
|
|
satsFeePaid: Int
|
2021-05-13 13:28:38 +00:00
|
|
|
status: String
|
2021-05-13 01:51:37 +00:00
|
|
|
}
|
2021-11-30 15:23:26 +00:00
|
|
|
|
2021-12-14 16:42:54 +00:00
|
|
|
type Fact {
|
|
|
|
id: ID!
|
2021-12-16 17:27:12 +00:00
|
|
|
factId: ID!
|
2021-12-15 16:50:11 +00:00
|
|
|
bolt11: String
|
2023-07-27 00:18:42 +00:00
|
|
|
createdAt: Date!
|
2022-12-19 22:27:52 +00:00
|
|
|
sats: Float!
|
|
|
|
satsFee: Float
|
2021-12-16 20:02:17 +00:00
|
|
|
status: String
|
2021-12-14 16:42:54 +00:00
|
|
|
type: String!
|
2021-12-15 16:50:11 +00:00
|
|
|
description: String
|
2021-12-16 20:02:17 +00:00
|
|
|
item: Item
|
2021-12-14 16:42:54 +00:00
|
|
|
}
|
2021-11-30 15:23:26 +00:00
|
|
|
|
|
|
|
type History {
|
|
|
|
facts: [Fact!]!
|
|
|
|
cursor: String
|
|
|
|
}
|
2021-04-30 21:42:51 +00:00
|
|
|
`
|