Skip to content

Commit

Permalink
Merge pull request #74 from lightsparkdev/feat/remotesigning
Browse files Browse the repository at this point in the history
Implement the remote signing webhook handlers.
  • Loading branch information
jklein24 authored Sep 18, 2023
2 parents 2517b89 + aa8e76e commit 6d76295
Show file tree
Hide file tree
Showing 13 changed files with 629 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package com.lightspark.sdk.graphql

import com.lightspark.sdk.model.DeclineToSignMessagesOutput

const val DeclineToSignMessagesMutation = """
mutation DeclineToSignMessages(${'$'}payload_ids: [ID!]!) {
decline_to_sign_messages(input: {
payload_ids: ${'$'}payload_ids
}) {
...DeclineToSignMessagesOutputFragment
}
}
${DeclineToSignMessagesOutput.FRAGMENT}
"""
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package com.lightspark.sdk.graphql

import com.lightspark.sdk.model.ReleaseChannelPerCommitmentSecretOutput

const val ReleaseChannelPerCommitmentSecretMutation = """
mutation ReleaseChannelPerCommitmentSecret(
${'$'}channel_id: ID!
${'$'}per_commitment_secret: Hash32!
${'$'}per_commitment_index: Long!
) {
release_channel_per_commitment_secret(input: {
channel_id: ${'$'}channel_id
per_commitment_secret: ${'$'}per_commitment_secret
per_commitment_index: ${'$'}per_commitment_index
}) {
...ReleaseChannelPerCommitmentSecretOutputFragment
}
}
${ReleaseChannelPerCommitmentSecretOutput.FRAGMENT}
"""
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package com.lightspark.sdk.graphql

import com.lightspark.sdk.model.ReleasePaymentPreimageOutput

const val ReleasePaymentPreimageMutation = """
mutation ReleasePaymentPreimage(
${'$'}invoice_id: ID!
${'$'}payment_preimage: Hash32!
) {
release_payment_preimage(input: {
invoice_id: ${'$'}invoice_id
payment_preimage: ${'$'}payment_preimage
}) {
...ReleasePaymentPreimageOutputFragment
}
}
${ReleasePaymentPreimageOutput.FRAGMENT}
"""
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package com.lightspark.sdk.graphql

import com.lightspark.sdk.model.SetInvoicePaymentHashOutput

const val SetInvoicePaymentHashMutation = """
mutation SetInvoicePaymentHash(
${'$'}invoice_id: ID!
${'$'}payment_hash: Hash32!
${'$'}preimage_nonce: Hash32!
) {
set_invoice_payment_hash(input: {
invoice_id: ${'$'}invoice_id
payment_hash: ${'$'}payment_hash
preimage_nonce: ${'$'}preimage_nonce
}) {
...SetInvoicePaymentHashOutputFragment
}
}
${SetInvoicePaymentHashOutput.FRAGMENT}
"""
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package com.lightspark.sdk.graphql

import com.lightspark.sdk.model.SignInvoiceOutput

const val SignInvoiceMutation = """
mutation SignInvoice(
${'$'}invoice_id : ID!
${'$'}signature : Signature!
${'$'}recovery_id : Int!
) {
sign_invoice(input: {
invoice_id: ${'$'}invoice_id
signature: ${'$'}signature
recovery_id: ${'$'}recovery_id
}) {
...SignInvoiceOutputFragment
}
}
${SignInvoiceOutput.FRAGMENT}
"""
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package com.lightspark.sdk.graphql

import com.lightspark.sdk.model.SignMessagesOutput

const val SignMessagesMutation = """
mutation SignMessages(
${'$'}signatures: [IdAndSignature!]!
) {
sign_messages(input: {
signatures: ${'$'}signatures
}) {
...SignMessagesOutputFragment
}
}
${SignMessagesOutput.FRAGMENT}
"""
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package com.lightspark.sdk.graphql

import com.lightspark.sdk.model.UpdateChannelPerCommitmentPointOutput

const val UpdateChannelPerCommitmentPointMutation = """
mutation UpdateChannelPerCommitmentPoint(
${'$'}channel_id : ID!
${'$'}per_commitment_point : PublicKey!
${'$'}per_commitment_point_index : Long!
) {
update_channel_per_commitment_point(input: {
channel_id: ${'$'}channel_id
per_commitment_point_index: ${'$'}per_commitment_point_index
per_commitment_point: ${'$'}per_commitment_point
}) {
...UpdateChannelPerCommitmentPointOutputFragment
}
}
${UpdateChannelPerCommitmentPointOutput.FRAGMENT}
"""
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package com.lightspark.sdk.graphql

import com.lightspark.sdk.model.UpdateNodeSharedSecretOutput

const val UpdateNodeSharedSecretMutation = """
mutation UpdateNodeSharedSecret(
${'$'}node_id : ID!
${'$'}shared_secret : Hash32!
) {
update_node_shared_secret(input: {
node_id: ${'$'}node_id
shared_secret: ${'$'}shared_secret
}) {
...UpdateNodeSharedSecretOutputFragment
}
}
${UpdateNodeSharedSecretOutput.FRAGMENT}
"""
Loading

0 comments on commit 6d76295

Please sign in to comment.