setlife-network / trinary

A budgeting tool for tracking workflows and cashflows while collaborating with others on projects
MIT License
6 stars 2 forks source link

Define wallet APIs #702

Open otech47 opened 1 year ago

rishkwal commented 1 year ago

We can have a query to get the necessary wallet details

getWalletDetails {
    onchainAddress
    balance
    balanceLastUpdated
}
otech47 commented 1 year ago

Contributor.onchainAddress

ContributorType {
  ...
  onchainAddress: String
}

Contributor.lightningInvoice

ContributorType {
  ...
  lightningInvoice(amount: Int!, memo: String): String
}

WalletType: query - getInvoiceStatus

query {
  getInvoiceStatus(invoice: String!): String
}

WalletType: mutation - configureWallet

type SimpleWalletConfig {
  onchainAddress: String!
}
type AdvancedWalletConfig {
  macaroon: String!,
  host: String!
}
mutation {
  configureWallet(
    simpleConfig: SimpleWalletConfig,
    advancedConfig: AdvancedWalletConfig,
    federatedConfig: Boolean
  )
}