-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #74 from lightsparkdev/feat/remotesigning
Implement the remote signing webhook handlers.
- Loading branch information
Showing
13 changed files
with
629 additions
and
0 deletions.
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
lightspark-sdk/src/commonMain/kotlin/com/lightspark/sdk/graphql/DeclineToSignMessages.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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} | ||
""" |
21 changes: 21 additions & 0 deletions
21
...sdk/src/commonMain/kotlin/com/lightspark/sdk/graphql/ReleaseChannelPerCommitmentSecret.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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} | ||
""" |
19 changes: 19 additions & 0 deletions
19
lightspark-sdk/src/commonMain/kotlin/com/lightspark/sdk/graphql/ReleasePaymentPreimage.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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} | ||
""" |
21 changes: 21 additions & 0 deletions
21
lightspark-sdk/src/commonMain/kotlin/com/lightspark/sdk/graphql/SetInvoicePaymentHash.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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} | ||
""" |
21 changes: 21 additions & 0 deletions
21
lightspark-sdk/src/commonMain/kotlin/com/lightspark/sdk/graphql/SignInvoice.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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} | ||
""" |
17 changes: 17 additions & 0 deletions
17
lightspark-sdk/src/commonMain/kotlin/com/lightspark/sdk/graphql/SignMessages.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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} | ||
""" |
21 changes: 21 additions & 0 deletions
21
...k-sdk/src/commonMain/kotlin/com/lightspark/sdk/graphql/UpdateChannelPerCommitmentPoint.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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} | ||
""" |
19 changes: 19 additions & 0 deletions
19
lightspark-sdk/src/commonMain/kotlin/com/lightspark/sdk/graphql/UpdateNodeSharedSecret.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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} | ||
""" |
Oops, something went wrong.