API
Ghost
Endpoints

Ghost API

Documentation on our Ghost API endpoints

Queries

Get a Ghost Payment

Get a Ghost Payment, which includes the preimage to settle the HTLC.

See it in the Apollo Explorer here (opens in a new tab).

Query

query GetGhostPayment($input: GhostPaymentInput!) {
  getGhostPayment(input: $input) {
    payment_amount
    preimage
  }
}

Variables

{
  "input": {
    "payment_hash": string,
    "signature": string
  }
}

Mutations

Claim a Ghost Address

Mutation

See it in the Apollo Explorer here (opens in a new tab).

mutation ClaimGhostAddress($address: String) {
  claimGhostAddress(address: $address) {
    username
  }
}

Variables

Note: only paid users are able to provide a custom address. Free users are assigned a uniqely generated address.

{
  "address": string | null
}