Documentation
¶
Index ¶
- func DeclineToSignMessages(client *services.LightsparkClient, event webhooks.WebhookEvent) (string, error)
- func HandleDeriveKeyAndSignWebhook(client *services.LightsparkClient, webhook webhooks.WebhookEvent, ...) (string, error)
- func HandleEcdhWebhook(client *services.LightsparkClient, webhook webhooks.WebhookEvent, ...) (string, error)
- func HandleGetPerCommitmentPointWebhook(client *services.LightsparkClient, webhook webhooks.WebhookEvent, ...) (string, error)
- func HandleReleaseInvoicePreimageWebhook(client *services.LightsparkClient, webhook webhooks.WebhookEvent, ...) (string, error)
- func HandleReleasePerCommitmentSecretWebhook(client *services.LightsparkClient, webhook webhooks.WebhookEvent, ...) (string, error)
- func HandleRemoteSigningWebhook(client *services.LightsparkClient, validator Validator, ...) (string, error)
- func HandleRequestInvoicePaymentHashWebhook(client *services.LightsparkClient, webhook webhooks.WebhookEvent, ...) (string, error)
- func HandleSignInvoiceWebhook(client *services.LightsparkClient, webhook webhooks.WebhookEvent, ...) (string, error)
- type PositiveValidator
- type SigningJob
- type Validator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeclineToSignMessages ¶
func DeclineToSignMessages(client *services.LightsparkClient, event webhooks.WebhookEvent) (string, error)
func HandleDeriveKeyAndSignWebhook ¶
func HandleDeriveKeyAndSignWebhook(client *services.LightsparkClient, webhook webhooks.WebhookEvent, seedBytes []byte) (string, error)
func HandleEcdhWebhook ¶
func HandleEcdhWebhook(client *services.LightsparkClient, webhook webhooks.WebhookEvent, seedBytes []byte) (string, error)
func HandleGetPerCommitmentPointWebhook ¶
func HandleGetPerCommitmentPointWebhook(client *services.LightsparkClient, webhook webhooks.WebhookEvent, seedBytes []byte) (string, error)
func HandleReleaseInvoicePreimageWebhook ¶
func HandleReleaseInvoicePreimageWebhook(client *services.LightsparkClient, webhook webhooks.WebhookEvent, seedBytes []byte) (string, error)
func HandleReleasePerCommitmentSecretWebhook ¶
func HandleReleasePerCommitmentSecretWebhook(client *services.LightsparkClient, webhook webhooks.WebhookEvent, seedBytes []byte) (string, error)
func HandleRemoteSigningWebhook ¶
func HandleRemoteSigningWebhook( client *services.LightsparkClient, validator Validator, webhook webhooks.WebhookEvent, seedBytes []byte, ) (string, error)
HandleRemoteSigningWebhook handles a webhook event that is related to remote signing.
This method should only be called with a webhook event that has the event_type `WebhookEventTypeRemoteSigning`. The method will call the appropriate handler for the sub_event_type of the webhook.
Args:
client: The LightsparkClient used to respond to webhook events.
validator: A validator for deciding whether to sign events.
webhook: The webhook event that you want to handle.
seedBytes: The bytes of the master seed that you want to use to sign messages or derive keys.
func HandleRequestInvoicePaymentHashWebhook ¶
func HandleRequestInvoicePaymentHashWebhook(client *services.LightsparkClient, webhook webhooks.WebhookEvent, seedBytes []byte) (string, error)
func HandleSignInvoiceWebhook ¶
func HandleSignInvoiceWebhook(client *services.LightsparkClient, webhook webhooks.WebhookEvent, seedBytes []byte) (string, error)
Types ¶
type PositiveValidator ¶
type PositiveValidator struct{}
func (PositiveValidator) ShouldSign ¶
func (v PositiveValidator) ShouldSign(webhooks.WebhookEvent) bool
type SigningJob ¶
type SigningJob struct {
Id string `json:"id"`
DerivationPath string `json:"derivation_path"`
Message string `json:"message"`
AddTweak *string `json:"add_tweak"`
MulTweak *string `json:"mul_tweak"`
IsRaw bool `json:"is_raw"`
}
func (*SigningJob) AddTweakBytes ¶
func (j *SigningJob) AddTweakBytes() ([]byte, error)
func (*SigningJob) MessageBytes ¶
func (j *SigningJob) MessageBytes() ([]byte, error)
func (*SigningJob) MulTweakBytes ¶
func (j *SigningJob) MulTweakBytes() ([]byte, error)
type Validator ¶
type Validator interface {
ShouldSign(webhookEvent webhooks.WebhookEvent) bool
}
Validator an interface which decides whether to sign or reject a remote signing webhook event.
Click to show internal directories.
Click to hide internal directories.