diff --git a/objects/account.go b/objects/account.go index 0aa2f50..981d05b 100644 --- a/objects/account.go +++ b/objects/account.go @@ -1767,6 +1767,7 @@ func (obj Account) GetWithdrawalRequests(requester *requester.Requester, first * id } withdrawal_request_idempotency_key: idempotency_key + withdrawal_request_initiator: initiator } } } diff --git a/objects/create_lnurl_invoice_input.go b/objects/create_lnurl_invoice_input.go index 7547f2e..0206bd4 100644 --- a/objects/create_lnurl_invoice_input.go +++ b/objects/create_lnurl_invoice_input.go @@ -14,4 +14,7 @@ type CreateLnurlInvoiceInput struct { // ExpirySecs The expiry of the invoice in seconds. Default value is 86400 (1 day). ExpirySecs *int64 `json:"create_lnurl_invoice_input_expiry_secs"` + + // ReceiverHash An optional, monthly-rotated, unique hashed identifier corresponding to the receiver of the payment. + ReceiverHash *string `json:"create_lnurl_invoice_input_receiver_hash"` } diff --git a/objects/create_uma_invoice_input.go b/objects/create_uma_invoice_input.go index 2aff4db..13be7f5 100644 --- a/objects/create_uma_invoice_input.go +++ b/objects/create_uma_invoice_input.go @@ -9,4 +9,6 @@ type CreateUmaInvoiceInput struct { MetadataHash string `json:"create_uma_invoice_input_metadata_hash"` ExpirySecs *int64 `json:"create_uma_invoice_input_expiry_secs"` + + ReceiverHash *string `json:"create_uma_invoice_input_receiver_hash"` } diff --git a/objects/pay_uma_invoice_input.go b/objects/pay_uma_invoice_input.go index f85f9fb..56d941c 100644 --- a/objects/pay_uma_invoice_input.go +++ b/objects/pay_uma_invoice_input.go @@ -13,4 +13,7 @@ type PayUmaInvoiceInput struct { AmountMsats *int64 `json:"pay_uma_invoice_input_amount_msats"` IdempotencyKey *string `json:"pay_uma_invoice_input_idempotency_key"` + + // SenderHash An optional, monthly-rotated, unique hashed identifier corresponding to the sender of the payment. + SenderHash *string `json:"pay_uma_invoice_input_sender_hash"` } diff --git a/objects/request_initiator.go b/objects/request_initiator.go new file mode 100644 index 0000000..5aa66f7 --- /dev/null +++ b/objects/request_initiator.go @@ -0,0 +1,52 @@ +// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved +package objects + +import ( + "encoding/json" +) + +type RequestInitiator int + +const ( + RequestInitiatorUndefined RequestInitiator = iota + + RequestInitiatorCustomer + + RequestInitiatorLightspark +) + +func (a *RequestInitiator) UnmarshalJSON(b []byte) error { + var s string + if err := json.Unmarshal(b, &s); err != nil { + return err + } + switch s { + default: + *a = RequestInitiatorUndefined + case "CUSTOMER": + *a = RequestInitiatorCustomer + case "LIGHTSPARK": + *a = RequestInitiatorLightspark + + } + return nil +} + +func (a RequestInitiator) StringValue() string { + var s string + switch a { + default: + s = "undefined" + case RequestInitiatorCustomer: + s = "CUSTOMER" + case RequestInitiatorLightspark: + s = "LIGHTSPARK" + + } + return s +} + +func (a RequestInitiator) MarshalJSON() ([]byte, error) { + s := a.StringValue() + return json.Marshal(s) +} diff --git a/objects/wallet.go b/objects/wallet.go index a5bd1da..a69ce44 100644 --- a/objects/wallet.go +++ b/objects/wallet.go @@ -1140,6 +1140,7 @@ func (obj Wallet) GetWithdrawalRequests(requester *requester.Requester, first *i id } withdrawal_request_idempotency_key: idempotency_key + withdrawal_request_initiator: initiator } } } diff --git a/objects/withdrawal_request.go b/objects/withdrawal_request.go index 9722f7a..924224a 100644 --- a/objects/withdrawal_request.go +++ b/objects/withdrawal_request.go @@ -57,6 +57,9 @@ type WithdrawalRequest struct { // IdempotencyKey The idempotency key of the withdrawal request. IdempotencyKey *string `json:"withdrawal_request_idempotency_key"` + // Initiator The initiator of the withdrawal. + Initiator RequestInitiator `json:"withdrawal_request_initiator"` + // Typename The typename of the object Typename string `json:"__typename"` } @@ -116,6 +119,7 @@ fragment WithdrawalRequestFragment on WithdrawalRequest { id } withdrawal_request_idempotency_key: idempotency_key + withdrawal_request_initiator: initiator } ` )