From d09c2bf364745e8da5e53d9ef17e823438848b4e Mon Sep 17 00:00:00 2001 From: boufni95 Date: Sat, 13 Jul 2024 22:36:49 +0200 Subject: [PATCH] up --- proto/autogenerated/client.md | 484 ++-- proto/autogenerated/debug.txt | 2466 ++++++++++---------- proto/autogenerated/ts/types.ts | 2706 +++++++++++----------- proto/service/structs.proto | 2 - src/services/main/index.ts | 2 +- src/services/main/liquidityProvider.ts | 13 +- src/services/main/paymentManager.ts | 1 - src/services/main/rugPullTracker.ts | 2 +- src/services/main/watchdog.ts | 4 +- src/services/storage/liquidityStorage.ts | 8 + 10 files changed, 2832 insertions(+), 2856 deletions(-) diff --git a/proto/autogenerated/client.md b/proto/autogenerated/client.md index 1675edc5a..dde3509db 100644 --- a/proto/autogenerated/client.md +++ b/proto/autogenerated/client.md @@ -120,9 +120,9 @@ The nostr server will send back a message response, and inside the body there wi - __User__: - expected context content + - __app_id__: _string_ - __app_user_id__: _string_ - __user_id__: _string_ - - __app_id__: _string_ - __Admin__: - expected context content @@ -482,59 +482,16 @@ The nostr server will send back a message response, and inside the body there wi ## Messages ### The content of requests and response from the methods -### SetMockInvoiceAsPaidRequest - - __invoice__: _string_ - - __amount__: _number_ - -### AppUser - - __identifier__: _string_ - - __info__: _[UserInfo](#UserInfo)_ - - __max_withdrawable__: _number_ - -### SetMockAppBalanceRequest - - __amount__: _number_ - -### DecodeInvoiceResponse - - __amount__: _number_ - -### GetUserOperationsResponse - - __latestOutgoingInvoiceOperations__: _[UserOperations](#UserOperations)_ - - __latestIncomingInvoiceOperations__: _[UserOperations](#UserOperations)_ - - __latestOutgoingTxOperations__: _[UserOperations](#UserOperations)_ - - __latestIncomingTxOperations__: _[UserOperations](#UserOperations)_ - - __latestOutgoingUserToUserPayemnts__: _[UserOperations](#UserOperations)_ - - __latestIncomingUserToUserPayemnts__: _[UserOperations](#UserOperations)_ - -### Empty - -### ChainBalanceEvent - - __block_height__: _number_ - - __confirmed_balance__: _number_ - - __unconfirmed_balance__: _number_ - - __total_balance__: _number_ - -### RequestNPubLinkingTokenRequest - - __user_identifier__: _string_ - -### AuthApp - - __app__: _[Application](#Application)_ - - __auth_token__: _string_ - -### OpenChannelRequest - - __destination__: _string_ - - __fundingAmount__: _number_ - - __pushAmount__: _number_ - - __closeAddress__: _string_ - -### AddAppInvoiceRequest - - __payer_identifier__: _string_ - - __http_callback_url__: _string_ - - __invoice_req__: _[NewInvoiceRequest](#NewInvoiceRequest)_ - ### LnurlLinkResponse - __lnurl__: _string_ - __k1__: _string_ +### RelaysMigration + - __relays__: ARRAY of: _string_ + +### RequestNPubLinkingTokenResponse + - __token__: _string_ + ### BannedAppUser - __app_name__: _string_ - __app_id__: _string_ @@ -547,40 +504,34 @@ The nostr server will send back a message response, and inside the body there wi - __balance__: _number_ - __npub__: _string_ -### SetMockAppUserBalanceRequest - - __user_identifier__: _string_ - - __amount__: _number_ +### PayInvoiceResponse + - __preimage__: _string_ + - __amount_paid__: _number_ + - __operation_id__: _string_ + - __service_fee__: _number_ + - __network_fee__: _number_ + +### OpenChannelRequest + - __destination__: _string_ + - __fundingAmount__: _number_ + - __pushAmount__: _number_ + - __closeAddress__: _string_ + +### LndMetrics + - __nodes__: ARRAY of: _[LndNodeMetrics](#LndNodeMetrics)_ + +### LndGetInfoResponse + - __alias__: _string_ ### PayAddressRequest - __address__: _string_ - __amoutSats__: _number_ - __satsPerVByte__: _number_ -### UserOperations - - __fromIndex__: _number_ - - __toIndex__: _number_ - - __operations__: ARRAY of: _[UserOperation](#UserOperation)_ - -### UsageMetrics - - __metrics__: ARRAY of: _[UsageMetric](#UsageMetric)_ - -### AppMetrics - - __app__: _[Application](#Application)_ - - __users__: _[UsersInfo](#UsersInfo)_ - - __received__: _number_ - - __spent__: _number_ - - __available__: _number_ - - __fees__: _number_ - - __invoices__: _number_ - - __total_fees__: _number_ - - __operations__: ARRAY of: _[UserOperation](#UserOperation)_ - -### PayInvoiceRequest - - __invoice__: _string_ - - __amount__: _number_ - -### RelaysMigration - - __relays__: ARRAY of: _string_ +### AppsMetricsRequest + - __from_unix__: _number_ *this field is optional + - __to_unix__: _number_ *this field is optional + - __include_operations__: _boolean_ *this field is optional ### RoutingEvent - __incoming_channel_id__: _number_ @@ -596,11 +547,55 @@ The nostr server will send back a message response, and inside the body there wi - __offchain__: _boolean_ - __forward_fail_event__: _boolean_ -### LndGetInfoResponse - - __alias__: _string_ +### ClosedChannel + - __channel_id__: _string_ + - __capacity__: _number_ + - __closed_height__: _number_ -### DecodeInvoiceRequest +### AddAppRequest + - __name__: _string_ + - __allow_user_creation__: _boolean_ + +### ClosureMigration + - __closes_at_unix__: _number_ + +### BanUserResponse + - __balance_sats__: _number_ + - __banned_app_users__: ARRAY of: _[BannedAppUser](#BannedAppUser)_ + +### AddAppUserRequest + - __identifier__: _string_ + - __fail_if_exists__: _boolean_ + - __balance__: _number_ + +### SetMockAppUserBalanceRequest + - __user_identifier__: _string_ + - __amount__: _number_ + +### PayInvoiceRequest - __invoice__: _string_ + - __amount__: _number_ + +### LnurlWithdrawInfoResponse + - __tag__: _string_ + - __callback__: _string_ + - __k1__: _string_ + - __defaultDescription__: _string_ + - __minWithdrawable__: _number_ + - __maxWithdrawable__: _number_ + - __balanceCheck__: _string_ + - __payLink__: _string_ + +### UsageMetric + - __processed_at_ms__: _number_ + - __parsed_in_nano__: _number_ + - __auth_in_nano__: _number_ + - __validate_in_nano__: _number_ + - __handle_in_nano__: _number_ + - __rpc_name__: _string_ + - __batch__: _boolean_ + - __nostr__: _boolean_ + - __batch_size__: _number_ ### UsersInfo - __total__: _number_ @@ -610,45 +605,82 @@ The nostr server will send back a message response, and inside the body there wi - __balance_avg__: _number_ - __balance_median__: _number_ -### NewInvoiceResponse - - __invoice__: _string_ +### BanUserRequest + - __user_id__: _string_ -### AddAppUserInvoiceRequest - - __receiver_identifier__: _string_ - - __payer_identifier__: _string_ - - __http_callback_url__: _string_ - - __invoice_req__: _[NewInvoiceRequest](#NewInvoiceRequest)_ +### UserOperations + - __fromIndex__: _number_ + - __toIndex__: _number_ + - __operations__: ARRAY of: _[UserOperation](#UserOperation)_ -### GetAppUserRequest +### RequestNPubLinkingTokenRequest - __user_identifier__: _string_ -### PayAddressResponse - - __txId__: _string_ - - __operation_id__: _string_ +### UserOperation + - __paidAtUnix__: _number_ + - __type__: _[UserOperationType](#UserOperationType)_ + - __inbound__: _boolean_ + - __amount__: _number_ + - __identifier__: _string_ + - __operationId__: _string_ - __service_fee__: _number_ - __network_fee__: _number_ + - __confirmed__: _boolean_ + - __tx_hash__: _string_ + - __internal__: _boolean_ ### Product - __id__: _string_ - __name__: _string_ - __price_sats__: _number_ -### AppsMetrics - - __apps__: ARRAY of: _[AppMetrics](#AppMetrics)_ +### LinkNPubThroughTokenRequest + - __token__: _string_ + - __nostr_pub__: _string_ -### LndGetInfoRequest - - __nodeId__: _number_ +### EncryptionExchangeRequest + - __publicKey__: _string_ + - __deviceId__: _string_ -### AddAppUserRequest - - __identifier__: _string_ - - __fail_if_exists__: _boolean_ - - __balance__: _number_ +### PayAppUserInvoiceRequest + - __user_identifier__: _string_ + - __invoice__: _string_ + - __amount__: _number_ + +### SendAppUserToAppPaymentRequest + - __from_user_identifier__: _string_ + - __amount__: _number_ ### SendAppUserToAppUserPaymentRequest - __from_user_identifier__: _string_ - __to_user_identifier__: _string_ - __amount__: _number_ +### NewInvoiceRequest + - __amountSats__: _number_ + - __memo__: _string_ + +### MigrationUpdate + - __closure__: _[ClosureMigration](#ClosureMigration)_ *this field is optional + - __relays__: _[RelaysMigration](#RelaysMigration)_ *this field is optional + +### GetUserOperationsResponse + - __latestOutgoingInvoiceOperations__: _[UserOperations](#UserOperations)_ + - __latestIncomingInvoiceOperations__: _[UserOperations](#UserOperations)_ + - __latestOutgoingTxOperations__: _[UserOperations](#UserOperations)_ + - __latestIncomingTxOperations__: _[UserOperations](#UserOperations)_ + - __latestOutgoingUserToUserPayemnts__: _[UserOperations](#UserOperations)_ + - __latestIncomingUserToUserPayemnts__: _[UserOperations](#UserOperations)_ + +### AddAppUserInvoiceRequest + - __receiver_identifier__: _string_ + - __payer_identifier__: _string_ + - __http_callback_url__: _string_ + - __invoice_req__: _[NewInvoiceRequest](#NewInvoiceRequest)_ + +### DecodeInvoiceRequest + - __invoice__: _string_ + ### UserInfo - __userId__: _string_ - __balance__: _number_ @@ -658,185 +690,133 @@ The nostr server will send back a message response, and inside the body there wi - __network_max_fee_bps__: _number_ - __network_max_fee_fixed__: _number_ -### ChannelBalanceEvent - - __block_height__: _number_ - - __channel_id__: _string_ - - __local_balance_sats__: _number_ - - __remote_balance_sats__: _number_ +### DecodeInvoiceResponse + - __amount__: _number_ -### OpenChannel - - __channel_id__: _string_ - - __capacity__: _number_ - - __active__: _boolean_ - - __lifetime__: _number_ - - __local_balance__: _number_ - - __remote_balance__: _number_ +### OpenChannelResponse + - __channelId__: _string_ -### GetAppUserLNURLInfoRequest - - __user_identifier__: _string_ - - __base_url_override__: _string_ +### LiveUserOperation + - __operation__: _[UserOperation](#UserOperation)_ -### NewInvoiceRequest - - __amountSats__: _number_ - - __memo__: _string_ +### UsageMetrics + - __metrics__: ARRAY of: _[UsageMetric](#UsageMetric)_ -### UsageMetric - - __processed_at_ms__: _number_ - - __parsed_in_nano__: _number_ - - __auth_in_nano__: _number_ - - __validate_in_nano__: _number_ - - __handle_in_nano__: _number_ - - __rpc_name__: _string_ - - __batch__: _boolean_ - - __nostr__: _boolean_ - - __batch_size__: _number_ +### AuthApp + - __app__: _[Application](#Application)_ + - __auth_token__: _string_ -### LndNodeMetrics - - __channels_balance_events__: ARRAY of: _[ChannelBalanceEvent](#ChannelBalanceEvent)_ - - __chain_balance_events__: ARRAY of: _[ChainBalanceEvent](#ChainBalanceEvent)_ - - __offline_channels__: _number_ - - __online_channels__: _number_ - - __pending_channels__: _number_ - - __closing_channels__: _number_ - - __open_channels__: ARRAY of: _[OpenChannel](#OpenChannel)_ - - __closed_channels__: ARRAY of: _[ClosedChannel](#ClosedChannel)_ - - __channel_routing__: ARRAY of: _[ChannelRouting](#ChannelRouting)_ +### AddAppInvoiceRequest + - __payer_identifier__: _string_ + - __http_callback_url__: _string_ + - __invoice_req__: _[NewInvoiceRequest](#NewInvoiceRequest)_ -### MigrationUpdate - - __closure__: _[ClosureMigration](#ClosureMigration)_ *this field is optional - - __relays__: _[RelaysMigration](#RelaysMigration)_ *this field is optional +### HandleLnurlPayResponse + - __pr__: _string_ + - __routes__: ARRAY of: _[Empty](#Empty)_ -### RequestNPubLinkingTokenResponse - - __token__: _string_ +### Empty -### PayAppUserInvoiceRequest - - __user_identifier__: _string_ - - __invoice__: _string_ - - __amount__: _number_ +### ChannelBalanceEvent + - __block_height__: _number_ + - __channel_id__: _string_ + - __local_balance_sats__: _number_ + - __remote_balance_sats__: _number_ -### NewAddressResponse - - __address__: _string_ +### GetAppUserRequest + - __user_identifier__: _string_ -### HandleLnurlPayResponse - - __pr__: _string_ - - __routes__: ARRAY of: _[Empty](#Empty)_ +### AddProductRequest + - __name__: _string_ + - __price_sats__: _number_ -### UserOperation - - __paidAtUnix__: _number_ - - __type__: _[UserOperationType](#UserOperationType)_ - - __inbound__: _boolean_ - - __amount__: _number_ +### AppUser - __identifier__: _string_ - - __operationId__: _string_ - - __service_fee__: _number_ - - __network_fee__: _number_ - - __confirmed__: _boolean_ - - __tx_hash__: _string_ - - __internal__: _boolean_ + - __info__: _[UserInfo](#UserInfo)_ + - __max_withdrawable__: _number_ -### ClosureMigration - - __closes_at_unix__: _number_ +### GetAppUserLNURLInfoRequest + - __user_identifier__: _string_ + - __base_url_override__: _string_ -### BanUserRequest - - __user_id__: _string_ +### SetMockAppBalanceRequest + - __amount__: _number_ ### NewAddressRequest - __addressType__: _[AddressType](#AddressType)_ -### PayInvoiceResponse - - __preimage__: _string_ - - __amount_paid__: _number_ - - __operation_id__: _string_ - - __service_fee__: _number_ - - __network_fee__: _number_ - - __latest_balance__: _number_ - -### OpenChannelResponse - - __channelId__: _string_ - ### GetProductBuyLinkResponse - __link__: _string_ -### LiveUserOperation - - __operation__: _[UserOperation](#UserOperation)_ - - __latest_balance__: _number_ - -### ClosedChannel - - __channel_id__: _string_ - - __capacity__: _number_ - - __closed_height__: _number_ +### HttpCreds + - __url__: _string_ + - __token__: _string_ -### AddAppRequest - - __name__: _string_ - - __allow_user_creation__: _boolean_ +### AppMetrics + - __app__: _[Application](#Application)_ + - __users__: _[UsersInfo](#UsersInfo)_ + - __received__: _number_ + - __spent__: _number_ + - __available__: _number_ + - __fees__: _number_ + - __invoices__: _number_ + - __total_fees__: _number_ + - __operations__: ARRAY of: _[UserOperation](#UserOperation)_ -### BanUserResponse - - __balance_sats__: _number_ - - __banned_app_users__: ARRAY of: _[BannedAppUser](#BannedAppUser)_ +### ChainBalanceEvent + - __block_height__: _number_ + - __confirmed_balance__: _number_ + - __unconfirmed_balance__: _number_ + - __total_balance__: _number_ -### SendAppUserToAppPaymentRequest - - __from_user_identifier__: _string_ +### SetMockInvoiceAsPaidRequest + - __invoice__: _string_ - __amount__: _number_ -### LndMetricsRequest - - __from_unix__: _number_ *this field is optional - - __to_unix__: _number_ *this field is optional +### LndGetInfoRequest + - __nodeId__: _number_ -### LndMetrics - - __nodes__: ARRAY of: _[LndNodeMetrics](#LndNodeMetrics)_ +### NewAddressResponse + - __address__: _string_ -### HttpCreds - - __url__: _string_ - - __token__: _string_ +### PayAddressResponse + - __txId__: _string_ + - __operation_id__: _string_ + - __service_fee__: _number_ + - __network_fee__: _number_ -### AppsMetricsRequest - - __from_unix__: _number_ *this field is optional - - __to_unix__: _number_ *this field is optional - - __include_operations__: _boolean_ *this field is optional +### AppsMetrics + - __apps__: ARRAY of: _[AppMetrics](#AppMetrics)_ + +### LndNodeMetrics + - __channels_balance_events__: ARRAY of: _[ChannelBalanceEvent](#ChannelBalanceEvent)_ + - __chain_balance_events__: ARRAY of: _[ChainBalanceEvent](#ChainBalanceEvent)_ + - __offline_channels__: _number_ + - __online_channels__: _number_ + - __pending_channels__: _number_ + - __closing_channels__: _number_ + - __open_channels__: ARRAY of: _[OpenChannel](#OpenChannel)_ + - __closed_channels__: ARRAY of: _[ClosedChannel](#ClosedChannel)_ + - __channel_routing__: ARRAY of: _[ChannelRouting](#ChannelRouting)_ ### AuthAppRequest - __name__: _string_ - __allow_user_creation__: _boolean_ *this field is optional -### LnurlWithdrawInfoResponse - - __tag__: _string_ - - __callback__: _string_ - - __k1__: _string_ - - __defaultDescription__: _string_ - - __minWithdrawable__: _number_ - - __maxWithdrawable__: _number_ - - __balanceCheck__: _string_ - - __payLink__: _string_ - -### GetUserOperationsRequest - - __latestIncomingInvoice__: _number_ - - __latestOutgoingInvoice__: _number_ - - __latestIncomingTx__: _number_ - - __latestOutgoingTx__: _number_ - - __latestIncomingUserToUserPayment__: _number_ - - __latestOutgoingUserToUserPayment__: _number_ - - __max_size__: _number_ - -### LnurlPayInfoResponse - - __tag__: _string_ - - __callback__: _string_ - - __maxSendable__: _number_ - - __minSendable__: _number_ - - __metadata__: _string_ - - __allowsNostr__: _boolean_ - - __nostrPubkey__: _string_ - -### AddProductRequest - - __name__: _string_ - - __price_sats__: _number_ +### LndMetricsRequest + - __from_unix__: _number_ *this field is optional + - __to_unix__: _number_ *this field is optional -### LinkNPubThroughTokenRequest - - __token__: _string_ - - __nostr_pub__: _string_ +### OpenChannel + - __channel_id__: _string_ + - __capacity__: _number_ + - __active__: _boolean_ + - __lifetime__: _number_ + - __local_balance__: _number_ + - __remote_balance__: _number_ -### EncryptionExchangeRequest - - __publicKey__: _string_ - - __deviceId__: _string_ +### NewInvoiceResponse + - __invoice__: _string_ ### ChannelRouting - __channel_id__: _string_ @@ -849,6 +829,24 @@ The nostr server will send back a message response, and inside the body there wi - __forward_fee_as_input__: _number_ - __forward_fee_as_output__: _number_ - __events_number__: _number_ + +### LnurlPayInfoResponse + - __tag__: _string_ + - __callback__: _string_ + - __maxSendable__: _number_ + - __minSendable__: _number_ + - __metadata__: _string_ + - __allowsNostr__: _boolean_ + - __nostrPubkey__: _string_ + +### GetUserOperationsRequest + - __latestIncomingInvoice__: _number_ + - __latestOutgoingInvoice__: _number_ + - __latestIncomingTx__: _number_ + - __latestOutgoingTx__: _number_ + - __latestIncomingUserToUserPayment__: _number_ + - __latestOutgoingUserToUserPayment__: _number_ + - __max_size__: _number_ ## Enums ### The enumerators used in the messages diff --git a/proto/autogenerated/debug.txt b/proto/autogenerated/debug.txt index e57fa7fc9..e04349134 100644 --- a/proto/autogenerated/debug.txt +++ b/proto/autogenerated/debug.txt @@ -1,5 +1,5 @@ ([]*main.Method) (len=46 cap=64) { - (*main.Method)(0xc0004e41e0)({ + (*main.Method)(0xc00026c910)({ in: (main.MethodMessage) { name: (string) (len=17) "LndGetInfoRequest", hasZeroFields: (bool) false @@ -10,7 +10,7 @@ hasZeroFields: (bool) false }, opts: (*main.methodOptions)(0xc000089380)({ - authType: (*main.supportedAuth)(0xc000567500)({ + authType: (*main.supportedAuth)(0xc0000b74a0)({ id: (string) (len=5) "admin", name: (string) (len=5) "Admin", context: (map[string]string) (len=1) { @@ -28,7 +28,7 @@ }), serverStream: (bool) false }), - (*main.Method)(0xc0004e4280)({ + (*main.Method)(0xc00026caa0)({ in: (main.MethodMessage) { name: (string) (len=13) "AddAppRequest", hasZeroFields: (bool) false @@ -38,8 +38,8 @@ name: (string) (len=7) "AuthApp", hasZeroFields: (bool) false }, - opts: (*main.methodOptions)(0xc000568000)({ - authType: (*main.supportedAuth)(0xc000567590)({ + opts: (*main.methodOptions)(0xc0000b8000)({ + authType: (*main.supportedAuth)(0xc0000b7530)({ id: (string) (len=5) "admin", name: (string) (len=5) "Admin", context: (map[string]string) (len=1) { @@ -57,7 +57,7 @@ }), serverStream: (bool) false }), - (*main.Method)(0xc0004e4320)({ + (*main.Method)(0xc00026cb40)({ in: (main.MethodMessage) { name: (string) (len=14) "AuthAppRequest", hasZeroFields: (bool) false @@ -67,8 +67,8 @@ name: (string) (len=7) "AuthApp", hasZeroFields: (bool) false }, - opts: (*main.methodOptions)(0xc000568180)({ - authType: (*main.supportedAuth)(0xc000567620)({ + opts: (*main.methodOptions)(0xc0000b8180)({ + authType: (*main.supportedAuth)(0xc0000b75c0)({ id: (string) (len=5) "admin", name: (string) (len=5) "Admin", context: (map[string]string) (len=1) { @@ -86,7 +86,7 @@ }), serverStream: (bool) false }), - (*main.Method)(0xc0004e43c0)({ + (*main.Method)(0xc00026cbe0)({ in: (main.MethodMessage) { name: (string) (len=14) "BanUserRequest", hasZeroFields: (bool) false @@ -96,8 +96,8 @@ name: (string) (len=15) "BanUserResponse", hasZeroFields: (bool) false }, - opts: (*main.methodOptions)(0xc000568300)({ - authType: (*main.supportedAuth)(0xc0005676b0)({ + opts: (*main.methodOptions)(0xc0000b8300)({ + authType: (*main.supportedAuth)(0xc0000b7650)({ id: (string) (len=5) "admin", name: (string) (len=5) "Admin", context: (map[string]string) (len=1) { @@ -115,7 +115,7 @@ }), serverStream: (bool) false }), - (*main.Method)(0xc0004e4410)({ + (*main.Method)(0xc00026cc30)({ in: (main.MethodMessage) { name: (string) (len=5) "Empty", hasZeroFields: (bool) true @@ -125,8 +125,8 @@ name: (string) (len=12) "UsageMetrics", hasZeroFields: (bool) false }, - opts: (*main.methodOptions)(0xc000568480)({ - authType: (*main.supportedAuth)(0xc000567740)({ + opts: (*main.methodOptions)(0xc0000b8480)({ + authType: (*main.supportedAuth)(0xc0000b76e0)({ id: (string) (len=7) "metrics", name: (string) (len=7) "Metrics", context: (map[string]string) (len=1) { @@ -144,7 +144,7 @@ }), serverStream: (bool) false }), - (*main.Method)(0xc0004e4460)({ + (*main.Method)(0xc00026cc80)({ in: (main.MethodMessage) { name: (string) (len=18) "AppsMetricsRequest", hasZeroFields: (bool) false @@ -154,8 +154,8 @@ name: (string) (len=11) "AppsMetrics", hasZeroFields: (bool) false }, - opts: (*main.methodOptions)(0xc000568600)({ - authType: (*main.supportedAuth)(0xc0005677d0)({ + opts: (*main.methodOptions)(0xc0000b8600)({ + authType: (*main.supportedAuth)(0xc0000b7770)({ id: (string) (len=7) "metrics", name: (string) (len=7) "Metrics", context: (map[string]string) (len=1) { @@ -173,7 +173,7 @@ }), serverStream: (bool) false }), - (*main.Method)(0xc0004e44b0)({ + (*main.Method)(0xc00026ccd0)({ in: (main.MethodMessage) { name: (string) (len=17) "LndMetricsRequest", hasZeroFields: (bool) false @@ -183,8 +183,8 @@ name: (string) (len=10) "LndMetrics", hasZeroFields: (bool) false }, - opts: (*main.methodOptions)(0xc000568780)({ - authType: (*main.supportedAuth)(0xc000567860)({ + opts: (*main.methodOptions)(0xc0000b8780)({ + authType: (*main.supportedAuth)(0xc0000b7800)({ id: (string) (len=7) "metrics", name: (string) (len=7) "Metrics", context: (map[string]string) (len=1) { @@ -202,7 +202,7 @@ }), serverStream: (bool) false }), - (*main.Method)(0xc0004e4500)({ + (*main.Method)(0xc00026cd20)({ in: (main.MethodMessage) { name: (string) (len=5) "Empty", hasZeroFields: (bool) true @@ -212,8 +212,8 @@ name: (string) (len=5) "Empty", hasZeroFields: (bool) true }, - opts: (*main.methodOptions)(0xc000568900)({ - authType: (*main.supportedAuth)(0xc0005678f0)({ + opts: (*main.methodOptions)(0xc0000b8900)({ + authType: (*main.supportedAuth)(0xc0000b7890)({ id: (string) (len=5) "guest", name: (string) (len=5) "Guest", context: (map[string]string) { @@ -230,7 +230,7 @@ }), serverStream: (bool) false }), - (*main.Method)(0xc0004e4550)({ + (*main.Method)(0xc00026cd70)({ in: (main.MethodMessage) { name: (string) (len=25) "EncryptionExchangeRequest", hasZeroFields: (bool) false @@ -240,8 +240,8 @@ name: (string) (len=5) "Empty", hasZeroFields: (bool) true }, - opts: (*main.methodOptions)(0xc000568a80)({ - authType: (*main.supportedAuth)(0xc0005679b0)({ + opts: (*main.methodOptions)(0xc0000b8a80)({ + authType: (*main.supportedAuth)(0xc0000b7950)({ id: (string) (len=5) "guest", name: (string) (len=5) "Guest", context: (map[string]string) { @@ -258,7 +258,7 @@ }), serverStream: (bool) false }), - (*main.Method)(0xc0004e45a0)({ + (*main.Method)(0xc00026cdc0)({ in: (main.MethodMessage) { name: (string) (len=27) "SetMockInvoiceAsPaidRequest", hasZeroFields: (bool) false @@ -268,8 +268,8 @@ name: (string) (len=5) "Empty", hasZeroFields: (bool) true }, - opts: (*main.methodOptions)(0xc000568c60)({ - authType: (*main.supportedAuth)(0xc000567a40)({ + opts: (*main.methodOptions)(0xc0000b8c60)({ + authType: (*main.supportedAuth)(0xc0000b79e0)({ id: (string) (len=5) "guest", name: (string) (len=5) "Guest", context: (map[string]string) { @@ -286,7 +286,7 @@ }), serverStream: (bool) false }), - (*main.Method)(0xc0004e4640)({ + (*main.Method)(0xc00026ce60)({ in: (main.MethodMessage) { name: (string) (len=5) "Empty", hasZeroFields: (bool) true @@ -296,8 +296,8 @@ name: (string) (len=25) "LnurlWithdrawInfoResponse", hasZeroFields: (bool) false }, - opts: (*main.methodOptions)(0xc000568fc0)({ - authType: (*main.supportedAuth)(0xc000567b90)({ + opts: (*main.methodOptions)(0xc0000b8fc0)({ + authType: (*main.supportedAuth)(0xc0000b7b30)({ id: (string) (len=5) "guest", name: (string) (len=5) "Guest", context: (map[string]string) { @@ -316,7 +316,7 @@ }), serverStream: (bool) false }), - (*main.Method)(0xc0004e46e0)({ + (*main.Method)(0xc00026cf00)({ in: (main.MethodMessage) { name: (string) (len=5) "Empty", hasZeroFields: (bool) true @@ -326,8 +326,8 @@ name: (string) (len=5) "Empty", hasZeroFields: (bool) true }, - opts: (*main.methodOptions)(0xc000569320)({ - authType: (*main.supportedAuth)(0xc000567ce0)({ + opts: (*main.methodOptions)(0xc0000b9320)({ + authType: (*main.supportedAuth)(0xc0000b7c80)({ id: (string) (len=5) "guest", name: (string) (len=5) "Guest", context: (map[string]string) { @@ -347,7 +347,7 @@ }), serverStream: (bool) false }), - (*main.Method)(0xc0004e4780)({ + (*main.Method)(0xc00026cfa0)({ in: (main.MethodMessage) { name: (string) (len=5) "Empty", hasZeroFields: (bool) true @@ -357,8 +357,8 @@ name: (string) (len=20) "LnurlPayInfoResponse", hasZeroFields: (bool) false }, - opts: (*main.methodOptions)(0xc000569680)({ - authType: (*main.supportedAuth)(0xc000567e00)({ + opts: (*main.methodOptions)(0xc0000b9680)({ + authType: (*main.supportedAuth)(0xc0000b7da0)({ id: (string) (len=5) "guest", name: (string) (len=5) "Guest", context: (map[string]string) { @@ -377,7 +377,7 @@ }), serverStream: (bool) false }), - (*main.Method)(0xc0004e4820)({ + (*main.Method)(0xc00026d040)({ in: (main.MethodMessage) { name: (string) (len=5) "Empty", hasZeroFields: (bool) true @@ -387,8 +387,8 @@ name: (string) (len=22) "HandleLnurlPayResponse", hasZeroFields: (bool) false }, - opts: (*main.methodOptions)(0xc000569a40)({ - authType: (*main.supportedAuth)(0xc000567f50)({ + opts: (*main.methodOptions)(0xc0000b9a40)({ + authType: (*main.supportedAuth)(0xc0000b7ef0)({ id: (string) (len=5) "guest", name: (string) (len=5) "Guest", context: (map[string]string) { @@ -410,7 +410,7 @@ }), serverStream: (bool) false }), - (*main.Method)(0xc0004e4870)({ + (*main.Method)(0xc00026d090)({ in: (main.MethodMessage) { name: (string) (len=5) "Empty", hasZeroFields: (bool) true @@ -420,8 +420,8 @@ name: (string) (len=20) "LnurlPayInfoResponse", hasZeroFields: (bool) false }, - opts: (*main.methodOptions)(0xc000569bc0)({ - authType: (*main.supportedAuth)(0xc00056c000)({ + opts: (*main.methodOptions)(0xc0000b9bc0)({ + authType: (*main.supportedAuth)(0xc0000b7f80)({ id: (string) (len=5) "guest", name: (string) (len=5) "Guest", context: (map[string]string) { @@ -440,7 +440,7 @@ }), serverStream: (bool) false }), - (*main.Method)(0xc0004e4910)({ + (*main.Method)(0xc00026d130)({ in: (main.MethodMessage) { name: (string) (len=27) "LinkNPubThroughTokenRequest", hasZeroFields: (bool) false @@ -450,14 +450,14 @@ name: (string) (len=5) "Empty", hasZeroFields: (bool) true }, - opts: (*main.methodOptions)(0xc000569da0)({ - authType: (*main.supportedAuth)(0xc00056c0c0)({ + opts: (*main.methodOptions)(0xc0000b9da0)({ + authType: (*main.supportedAuth)(0xc0000bc060)({ id: (string) (len=4) "user", name: (string) (len=4) "User", context: (map[string]string) (len=3) { + (string) (len=6) "app_id": (string) (len=6) "string", (string) (len=11) "app_user_id": (string) (len=6) "string", - (string) (len=7) "user_id": (string) (len=6) "string", - (string) (len=6) "app_id": (string) (len=6) "string" + (string) (len=7) "user_id": (string) (len=6) "string" } }), method: (string) (len=4) "post", @@ -471,7 +471,7 @@ }), serverStream: (bool) false }), - (*main.Method)(0xc0004e4960)({ + (*main.Method)(0xc00026d180)({ in: (main.MethodMessage) { name: (string) (len=5) "Empty", hasZeroFields: (bool) true @@ -481,8 +481,8 @@ name: (string) (len=11) "Application", hasZeroFields: (bool) false }, - opts: (*main.methodOptions)(0xc000569f20)({ - authType: (*main.supportedAuth)(0xc00056c150)({ + opts: (*main.methodOptions)(0xc0000b9f20)({ + authType: (*main.supportedAuth)(0xc0000bc0f0)({ id: (string) (len=3) "app", name: (string) (len=3) "App", context: (map[string]string) (len=1) { @@ -500,7 +500,7 @@ }), serverStream: (bool) false }), - (*main.Method)(0xc0004e4a00)({ + (*main.Method)(0xc00026d220)({ in: (main.MethodMessage) { name: (string) (len=17) "AddAppUserRequest", hasZeroFields: (bool) false @@ -510,8 +510,8 @@ name: (string) (len=7) "AppUser", hasZeroFields: (bool) false }, - opts: (*main.methodOptions)(0xc00056e0c0)({ - authType: (*main.supportedAuth)(0xc00056c1e0)({ + opts: (*main.methodOptions)(0xc0001420c0)({ + authType: (*main.supportedAuth)(0xc0000bc180)({ id: (string) (len=3) "app", name: (string) (len=3) "App", context: (map[string]string) (len=1) { @@ -529,7 +529,7 @@ }), serverStream: (bool) false }), - (*main.Method)(0xc0004e4aa0)({ + (*main.Method)(0xc00026d2c0)({ in: (main.MethodMessage) { name: (string) (len=20) "AddAppInvoiceRequest", hasZeroFields: (bool) false @@ -539,8 +539,8 @@ name: (string) (len=18) "NewInvoiceResponse", hasZeroFields: (bool) false }, - opts: (*main.methodOptions)(0xc00056e240)({ - authType: (*main.supportedAuth)(0xc00056c270)({ + opts: (*main.methodOptions)(0xc000142240)({ + authType: (*main.supportedAuth)(0xc0000bc210)({ id: (string) (len=3) "app", name: (string) (len=3) "App", context: (map[string]string) (len=1) { @@ -558,7 +558,7 @@ }), serverStream: (bool) false }), - (*main.Method)(0xc0004e4af0)({ + (*main.Method)(0xc00026d310)({ in: (main.MethodMessage) { name: (string) (len=24) "AddAppUserInvoiceRequest", hasZeroFields: (bool) false @@ -568,8 +568,8 @@ name: (string) (len=18) "NewInvoiceResponse", hasZeroFields: (bool) false }, - opts: (*main.methodOptions)(0xc00056e420)({ - authType: (*main.supportedAuth)(0xc00056c300)({ + opts: (*main.methodOptions)(0xc000142420)({ + authType: (*main.supportedAuth)(0xc0000bc2a0)({ id: (string) (len=3) "app", name: (string) (len=3) "App", context: (map[string]string) (len=1) { @@ -587,7 +587,7 @@ }), serverStream: (bool) false }), - (*main.Method)(0xc0004e4b90)({ + (*main.Method)(0xc00026d3b0)({ in: (main.MethodMessage) { name: (string) (len=17) "GetAppUserRequest", hasZeroFields: (bool) false @@ -597,8 +597,8 @@ name: (string) (len=7) "AppUser", hasZeroFields: (bool) false }, - opts: (*main.methodOptions)(0xc00056e5a0)({ - authType: (*main.supportedAuth)(0xc00056c390)({ + opts: (*main.methodOptions)(0xc0001425a0)({ + authType: (*main.supportedAuth)(0xc0000bc330)({ id: (string) (len=3) "app", name: (string) (len=3) "App", context: (map[string]string) (len=1) { @@ -616,7 +616,7 @@ }), serverStream: (bool) false }), - (*main.Method)(0xc0004e4c30)({ + (*main.Method)(0xc00026d450)({ in: (main.MethodMessage) { name: (string) (len=24) "PayAppUserInvoiceRequest", hasZeroFields: (bool) false @@ -626,8 +626,8 @@ name: (string) (len=18) "PayInvoiceResponse", hasZeroFields: (bool) false }, - opts: (*main.methodOptions)(0xc00056e720)({ - authType: (*main.supportedAuth)(0xc00056c420)({ + opts: (*main.methodOptions)(0xc000142720)({ + authType: (*main.supportedAuth)(0xc0000bc3c0)({ id: (string) (len=3) "app", name: (string) (len=3) "App", context: (map[string]string) (len=1) { @@ -645,7 +645,7 @@ }), serverStream: (bool) false }), - (*main.Method)(0xc0004e4c80)({ + (*main.Method)(0xc00026d4a0)({ in: (main.MethodMessage) { name: (string) (len=34) "SendAppUserToAppUserPaymentRequest", hasZeroFields: (bool) false @@ -655,8 +655,8 @@ name: (string) (len=5) "Empty", hasZeroFields: (bool) true }, - opts: (*main.methodOptions)(0xc00056e900)({ - authType: (*main.supportedAuth)(0xc00056c4b0)({ + opts: (*main.methodOptions)(0xc000142900)({ + authType: (*main.supportedAuth)(0xc0000bc450)({ id: (string) (len=3) "app", name: (string) (len=3) "App", context: (map[string]string) (len=1) { @@ -674,7 +674,7 @@ }), serverStream: (bool) false }), - (*main.Method)(0xc0004e4d20)({ + (*main.Method)(0xc00026d540)({ in: (main.MethodMessage) { name: (string) (len=30) "SendAppUserToAppPaymentRequest", hasZeroFields: (bool) false @@ -684,8 +684,8 @@ name: (string) (len=5) "Empty", hasZeroFields: (bool) true }, - opts: (*main.methodOptions)(0xc00056ea80)({ - authType: (*main.supportedAuth)(0xc00056c540)({ + opts: (*main.methodOptions)(0xc000142a80)({ + authType: (*main.supportedAuth)(0xc0000bc4e0)({ id: (string) (len=3) "app", name: (string) (len=3) "App", context: (map[string]string) (len=1) { @@ -703,7 +703,7 @@ }), serverStream: (bool) false }), - (*main.Method)(0xc0004e4d70)({ + (*main.Method)(0xc00026d590)({ in: (main.MethodMessage) { name: (string) (len=26) "GetAppUserLNURLInfoRequest", hasZeroFields: (bool) false @@ -713,8 +713,8 @@ name: (string) (len=20) "LnurlPayInfoResponse", hasZeroFields: (bool) false }, - opts: (*main.methodOptions)(0xc00056ec00)({ - authType: (*main.supportedAuth)(0xc00056c5d0)({ + opts: (*main.methodOptions)(0xc000142c00)({ + authType: (*main.supportedAuth)(0xc0000bc570)({ id: (string) (len=3) "app", name: (string) (len=3) "App", context: (map[string]string) (len=1) { @@ -732,7 +732,7 @@ }), serverStream: (bool) false }), - (*main.Method)(0xc0004e4dc0)({ + (*main.Method)(0xc00026d5e0)({ in: (main.MethodMessage) { name: (string) (len=28) "SetMockAppUserBalanceRequest", hasZeroFields: (bool) false @@ -742,8 +742,8 @@ name: (string) (len=5) "Empty", hasZeroFields: (bool) true }, - opts: (*main.methodOptions)(0xc00056ed80)({ - authType: (*main.supportedAuth)(0xc00056c660)({ + opts: (*main.methodOptions)(0xc000142d80)({ + authType: (*main.supportedAuth)(0xc0000bc600)({ id: (string) (len=3) "app", name: (string) (len=3) "App", context: (map[string]string) (len=1) { @@ -761,7 +761,7 @@ }), serverStream: (bool) false }), - (*main.Method)(0xc0004e4e10)({ + (*main.Method)(0xc00026d630)({ in: (main.MethodMessage) { name: (string) (len=24) "SetMockAppBalanceRequest", hasZeroFields: (bool) false @@ -771,8 +771,8 @@ name: (string) (len=5) "Empty", hasZeroFields: (bool) true }, - opts: (*main.methodOptions)(0xc00056ef60)({ - authType: (*main.supportedAuth)(0xc00056c6f0)({ + opts: (*main.methodOptions)(0xc000142f60)({ + authType: (*main.supportedAuth)(0xc0000bc690)({ id: (string) (len=3) "app", name: (string) (len=3) "App", context: (map[string]string) (len=1) { @@ -790,7 +790,7 @@ }), serverStream: (bool) false }), - (*main.Method)(0xc0004e4e60)({ + (*main.Method)(0xc00026d680)({ in: (main.MethodMessage) { name: (string) (len=30) "RequestNPubLinkingTokenRequest", hasZeroFields: (bool) false @@ -800,8 +800,8 @@ name: (string) (len=31) "RequestNPubLinkingTokenResponse", hasZeroFields: (bool) false }, - opts: (*main.methodOptions)(0xc00056f140)({ - authType: (*main.supportedAuth)(0xc00056c780)({ + opts: (*main.methodOptions)(0xc000143140)({ + authType: (*main.supportedAuth)(0xc0000bc720)({ id: (string) (len=3) "app", name: (string) (len=3) "App", context: (map[string]string) (len=1) { @@ -819,7 +819,7 @@ }), serverStream: (bool) false }), - (*main.Method)(0xc0004e4eb0)({ + (*main.Method)(0xc00026d6d0)({ in: (main.MethodMessage) { name: (string) (len=5) "Empty", hasZeroFields: (bool) true @@ -829,14 +829,14 @@ name: (string) (len=5) "Empty", hasZeroFields: (bool) true }, - opts: (*main.methodOptions)(0xc00056f320)({ - authType: (*main.supportedAuth)(0xc00056c810)({ + opts: (*main.methodOptions)(0xc000143320)({ + authType: (*main.supportedAuth)(0xc0000bc7b0)({ id: (string) (len=4) "user", name: (string) (len=4) "User", context: (map[string]string) (len=3) { - (string) (len=6) "app_id": (string) (len=6) "string", (string) (len=11) "app_user_id": (string) (len=6) "string", - (string) (len=7) "user_id": (string) (len=6) "string" + (string) (len=7) "user_id": (string) (len=6) "string", + (string) (len=6) "app_id": (string) (len=6) "string" } }), method: (string) (len=4) "post", @@ -850,7 +850,7 @@ }), serverStream: (bool) false }), - (*main.Method)(0xc0004e4f00)({ + (*main.Method)(0xc00026d720)({ in: (main.MethodMessage) { name: (string) (len=5) "Empty", hasZeroFields: (bool) true @@ -860,8 +860,8 @@ name: (string) (len=8) "UserInfo", hasZeroFields: (bool) false }, - opts: (*main.methodOptions)(0xc00056f500)({ - authType: (*main.supportedAuth)(0xc00056c8a0)({ + opts: (*main.methodOptions)(0xc000143500)({ + authType: (*main.supportedAuth)(0xc0000bc840)({ id: (string) (len=4) "user", name: (string) (len=4) "User", context: (map[string]string) (len=3) { @@ -881,7 +881,7 @@ }), serverStream: (bool) false }), - (*main.Method)(0xc0004e4fa0)({ + (*main.Method)(0xc00026d7c0)({ in: (main.MethodMessage) { name: (string) (len=17) "AddProductRequest", hasZeroFields: (bool) false @@ -891,14 +891,14 @@ name: (string) (len=7) "Product", hasZeroFields: (bool) false }, - opts: (*main.methodOptions)(0xc00056f6e0)({ - authType: (*main.supportedAuth)(0xc00056c930)({ + opts: (*main.methodOptions)(0xc0001436e0)({ + authType: (*main.supportedAuth)(0xc0000bc8d0)({ id: (string) (len=4) "user", name: (string) (len=4) "User", context: (map[string]string) (len=3) { - (string) (len=7) "user_id": (string) (len=6) "string", (string) (len=6) "app_id": (string) (len=6) "string", - (string) (len=11) "app_user_id": (string) (len=6) "string" + (string) (len=11) "app_user_id": (string) (len=6) "string", + (string) (len=7) "user_id": (string) (len=6) "string" } }), method: (string) (len=4) "post", @@ -912,7 +912,7 @@ }), serverStream: (bool) false }), - (*main.Method)(0xc0004e4ff0)({ + (*main.Method)(0xc00026d810)({ in: (main.MethodMessage) { name: (string) (len=5) "Empty", hasZeroFields: (bool) true @@ -922,8 +922,8 @@ name: (string) (len=18) "NewInvoiceResponse", hasZeroFields: (bool) false }, - opts: (*main.methodOptions)(0xc00056fb60)({ - authType: (*main.supportedAuth)(0xc00056ca50)({ + opts: (*main.methodOptions)(0xc000143b60)({ + authType: (*main.supportedAuth)(0xc0000bc9f0)({ id: (string) (len=4) "user", name: (string) (len=4) "User", context: (map[string]string) (len=3) { @@ -945,7 +945,7 @@ }), serverStream: (bool) false }), - (*main.Method)(0xc0004e5040)({ + (*main.Method)(0xc00026d860)({ in: (main.MethodMessage) { name: (string) (len=24) "GetUserOperationsRequest", hasZeroFields: (bool) false @@ -955,14 +955,14 @@ name: (string) (len=25) "GetUserOperationsResponse", hasZeroFields: (bool) false }, - opts: (*main.methodOptions)(0xc00056fd40)({ - authType: (*main.supportedAuth)(0xc00056cae0)({ + opts: (*main.methodOptions)(0xc000143d40)({ + authType: (*main.supportedAuth)(0xc0000bca80)({ id: (string) (len=4) "user", name: (string) (len=4) "User", context: (map[string]string) (len=3) { + (string) (len=11) "app_user_id": (string) (len=6) "string", (string) (len=7) "user_id": (string) (len=6) "string", - (string) (len=6) "app_id": (string) (len=6) "string", - (string) (len=11) "app_user_id": (string) (len=6) "string" + (string) (len=6) "app_id": (string) (len=6) "string" } }), method: (string) (len=4) "post", @@ -976,7 +976,7 @@ }), serverStream: (bool) false }), - (*main.Method)(0xc0004e50e0)({ + (*main.Method)(0xc00026d900)({ in: (main.MethodMessage) { name: (string) (len=17) "NewAddressRequest", hasZeroFields: (bool) false @@ -986,8 +986,8 @@ name: (string) (len=18) "NewAddressResponse", hasZeroFields: (bool) false }, - opts: (*main.methodOptions)(0xc00056ff20)({ - authType: (*main.supportedAuth)(0xc00056cb70)({ + opts: (*main.methodOptions)(0xc000143f20)({ + authType: (*main.supportedAuth)(0xc0000bcb10)({ id: (string) (len=4) "user", name: (string) (len=4) "User", context: (map[string]string) (len=3) { @@ -1007,7 +1007,7 @@ }), serverStream: (bool) false }), - (*main.Method)(0xc0004e5180)({ + (*main.Method)(0xc00026d9a0)({ in: (main.MethodMessage) { name: (string) (len=17) "PayAddressRequest", hasZeroFields: (bool) false @@ -1017,14 +1017,14 @@ name: (string) (len=18) "PayAddressResponse", hasZeroFields: (bool) false }, - opts: (*main.methodOptions)(0xc000572120)({ - authType: (*main.supportedAuth)(0xc00056cc00)({ + opts: (*main.methodOptions)(0xc000146120)({ + authType: (*main.supportedAuth)(0xc0000bcba0)({ id: (string) (len=4) "user", name: (string) (len=4) "User", context: (map[string]string) (len=3) { - (string) (len=11) "app_user_id": (string) (len=6) "string", (string) (len=7) "user_id": (string) (len=6) "string", - (string) (len=6) "app_id": (string) (len=6) "string" + (string) (len=6) "app_id": (string) (len=6) "string", + (string) (len=11) "app_user_id": (string) (len=6) "string" } }), method: (string) (len=4) "post", @@ -1038,7 +1038,7 @@ }), serverStream: (bool) false }), - (*main.Method)(0xc0004e5220)({ + (*main.Method)(0xc00026da40)({ in: (main.MethodMessage) { name: (string) (len=17) "NewInvoiceRequest", hasZeroFields: (bool) false @@ -1048,8 +1048,8 @@ name: (string) (len=18) "NewInvoiceResponse", hasZeroFields: (bool) false }, - opts: (*main.methodOptions)(0xc000572300)({ - authType: (*main.supportedAuth)(0xc00056cc90)({ + opts: (*main.methodOptions)(0xc000146300)({ + authType: (*main.supportedAuth)(0xc0000bcc30)({ id: (string) (len=4) "user", name: (string) (len=4) "User", context: (map[string]string) (len=3) { @@ -1069,7 +1069,7 @@ }), serverStream: (bool) false }), - (*main.Method)(0xc0004e52c0)({ + (*main.Method)(0xc00026dae0)({ in: (main.MethodMessage) { name: (string) (len=20) "DecodeInvoiceRequest", hasZeroFields: (bool) false @@ -1079,14 +1079,14 @@ name: (string) (len=21) "DecodeInvoiceResponse", hasZeroFields: (bool) false }, - opts: (*main.methodOptions)(0xc0005724e0)({ - authType: (*main.supportedAuth)(0xc00056cd20)({ + opts: (*main.methodOptions)(0xc0001464e0)({ + authType: (*main.supportedAuth)(0xc0000bccc0)({ id: (string) (len=4) "user", name: (string) (len=4) "User", context: (map[string]string) (len=3) { + (string) (len=6) "app_id": (string) (len=6) "string", (string) (len=11) "app_user_id": (string) (len=6) "string", - (string) (len=7) "user_id": (string) (len=6) "string", - (string) (len=6) "app_id": (string) (len=6) "string" + (string) (len=7) "user_id": (string) (len=6) "string" } }), method: (string) (len=4) "post", @@ -1100,7 +1100,7 @@ }), serverStream: (bool) false }), - (*main.Method)(0xc0004e5360)({ + (*main.Method)(0xc00026db80)({ in: (main.MethodMessage) { name: (string) (len=17) "PayInvoiceRequest", hasZeroFields: (bool) false @@ -1110,8 +1110,8 @@ name: (string) (len=18) "PayInvoiceResponse", hasZeroFields: (bool) false }, - opts: (*main.methodOptions)(0xc0005726c0)({ - authType: (*main.supportedAuth)(0xc00056cdb0)({ + opts: (*main.methodOptions)(0xc0001466c0)({ + authType: (*main.supportedAuth)(0xc0000bcd50)({ id: (string) (len=4) "user", name: (string) (len=4) "User", context: (map[string]string) (len=3) { @@ -1131,7 +1131,7 @@ }), serverStream: (bool) false }), - (*main.Method)(0xc0004e5400)({ + (*main.Method)(0xc00026dc20)({ in: (main.MethodMessage) { name: (string) (len=18) "OpenChannelRequest", hasZeroFields: (bool) false @@ -1141,14 +1141,14 @@ name: (string) (len=19) "OpenChannelResponse", hasZeroFields: (bool) false }, - opts: (*main.methodOptions)(0xc0005728a0)({ - authType: (*main.supportedAuth)(0xc00056ce40)({ + opts: (*main.methodOptions)(0xc0001468a0)({ + authType: (*main.supportedAuth)(0xc0000bcde0)({ id: (string) (len=4) "user", name: (string) (len=4) "User", context: (map[string]string) (len=3) { - (string) (len=6) "app_id": (string) (len=6) "string", (string) (len=11) "app_user_id": (string) (len=6) "string", - (string) (len=7) "user_id": (string) (len=6) "string" + (string) (len=7) "user_id": (string) (len=6) "string", + (string) (len=6) "app_id": (string) (len=6) "string" } }), method: (string) (len=4) "post", @@ -1162,7 +1162,7 @@ }), serverStream: (bool) false }), - (*main.Method)(0xc0004e54a0)({ + (*main.Method)(0xc00026dcc0)({ in: (main.MethodMessage) { name: (string) (len=5) "Empty", hasZeroFields: (bool) true @@ -1172,8 +1172,8 @@ name: (string) (len=17) "LnurlLinkResponse", hasZeroFields: (bool) false }, - opts: (*main.methodOptions)(0xc000572a80)({ - authType: (*main.supportedAuth)(0xc00056ced0)({ + opts: (*main.methodOptions)(0xc000146a80)({ + authType: (*main.supportedAuth)(0xc0000bce70)({ id: (string) (len=4) "user", name: (string) (len=4) "User", context: (map[string]string) (len=3) { @@ -1193,7 +1193,7 @@ }), serverStream: (bool) false }), - (*main.Method)(0xc0004e5540)({ + (*main.Method)(0xc00026dd60)({ in: (main.MethodMessage) { name: (string) (len=5) "Empty", hasZeroFields: (bool) true @@ -1203,8 +1203,8 @@ name: (string) (len=17) "LnurlLinkResponse", hasZeroFields: (bool) false }, - opts: (*main.methodOptions)(0xc000572c60)({ - authType: (*main.supportedAuth)(0xc00056cf60)({ + opts: (*main.methodOptions)(0xc000146c60)({ + authType: (*main.supportedAuth)(0xc0000bcf00)({ id: (string) (len=4) "user", name: (string) (len=4) "User", context: (map[string]string) (len=3) { @@ -1224,7 +1224,7 @@ }), serverStream: (bool) false }), - (*main.Method)(0xc0004e55e0)({ + (*main.Method)(0xc00026de00)({ in: (main.MethodMessage) { name: (string) (len=5) "Empty", hasZeroFields: (bool) true @@ -1234,8 +1234,8 @@ name: (string) (len=17) "LnurlLinkResponse", hasZeroFields: (bool) false }, - opts: (*main.methodOptions)(0xc000572e40)({ - authType: (*main.supportedAuth)(0xc00056cff0)({ + opts: (*main.methodOptions)(0xc000146e40)({ + authType: (*main.supportedAuth)(0xc0000bcf90)({ id: (string) (len=4) "user", name: (string) (len=4) "User", context: (map[string]string) (len=3) { @@ -1255,7 +1255,7 @@ }), serverStream: (bool) false }), - (*main.Method)(0xc0004e5680)({ + (*main.Method)(0xc00026dea0)({ in: (main.MethodMessage) { name: (string) (len=5) "Empty", hasZeroFields: (bool) true @@ -1265,8 +1265,8 @@ name: (string) (len=17) "LiveUserOperation", hasZeroFields: (bool) false }, - opts: (*main.methodOptions)(0xc000573020)({ - authType: (*main.supportedAuth)(0xc00056d080)({ + opts: (*main.methodOptions)(0xc000147020)({ + authType: (*main.supportedAuth)(0xc0000bd020)({ id: (string) (len=4) "user", name: (string) (len=4) "User", context: (map[string]string) (len=3) { @@ -1286,7 +1286,7 @@ }), serverStream: (bool) true }), - (*main.Method)(0xc0004e5720)({ + (*main.Method)(0xc00026df40)({ in: (main.MethodMessage) { name: (string) (len=5) "Empty", hasZeroFields: (bool) true @@ -1296,8 +1296,8 @@ name: (string) (len=15) "MigrationUpdate", hasZeroFields: (bool) false }, - opts: (*main.methodOptions)(0xc000573200)({ - authType: (*main.supportedAuth)(0xc00056d110)({ + opts: (*main.methodOptions)(0xc000147200)({ + authType: (*main.supportedAuth)(0xc0000bd0b0)({ id: (string) (len=4) "user", name: (string) (len=4) "User", context: (map[string]string) (len=3) { @@ -1317,7 +1317,7 @@ }), serverStream: (bool) true }), - (*main.Method)(0xc0004e5770)({ + (*main.Method)(0xc00026df90)({ in: (main.MethodMessage) { name: (string) (len=5) "Empty", hasZeroFields: (bool) true @@ -1327,14 +1327,14 @@ name: (string) (len=9) "HttpCreds", hasZeroFields: (bool) false }, - opts: (*main.methodOptions)(0xc0005733e0)({ - authType: (*main.supportedAuth)(0xc00056d1a0)({ + opts: (*main.methodOptions)(0xc0001473e0)({ + authType: (*main.supportedAuth)(0xc0000bd140)({ id: (string) (len=4) "user", name: (string) (len=4) "User", context: (map[string]string) (len=3) { - (string) (len=6) "app_id": (string) (len=6) "string", (string) (len=11) "app_user_id": (string) (len=6) "string", - (string) (len=7) "user_id": (string) (len=6) "string" + (string) (len=7) "user_id": (string) (len=6) "string", + (string) (len=6) "app_id": (string) (len=6) "string" } }), method: (string) (len=4) "post", @@ -1348,7 +1348,7 @@ }), serverStream: (bool) true }), - (*main.Method)(0xc0004e57c0)({ + (*main.Method)(0xc00008a050)({ in: (main.MethodMessage) { name: (string) (len=5) "Empty", hasZeroFields: (bool) true @@ -1358,8 +1358,8 @@ name: (string) (len=5) "Empty", hasZeroFields: (bool) true }, - opts: (*main.methodOptions)(0xc000573620)({ - authType: (*main.supportedAuth)(0xc00056d260)({ + opts: (*main.methodOptions)(0xc000147620)({ + authType: (*main.supportedAuth)(0xc0000bd200)({ id: (string) (len=4) "user", name: (string) (len=4) "User", context: (map[string]string) (len=3) { @@ -1382,7 +1382,7 @@ } ([]*main.Enum) (len=2 cap=2) { - (*main.Enum)(0xc000566bd0)({ + (*main.Enum)(0xc0000b6b70)({ name: (string) (len=11) "AddressType", values: ([]main.EnumValue) (len=3 cap=4) { (main.EnumValue) { @@ -1399,7 +1399,7 @@ } } }), - (*main.Enum)(0xc000566c30)({ + (*main.Enum)(0xc0000b6bd0)({ name: (string) (len=17) "UserOperationType", values: ([]main.EnumValue) (len=6 cap=8) { (main.EnumValue) { @@ -1431,12 +1431,12 @@ } (map[string]*main.Message) (len=70) { - (string) (len=17) "LndGetInfoRequest": (*main.Message)(0xc000078f00)({ - fullName: (string) (len=17) "LndGetInfoRequest", - name: (string) (len=17) "LndGetInfoRequest", + (string) (len=24) "SetMockAppBalanceRequest": (*main.Message)(0xc000461080)({ + fullName: (string) (len=24) "SetMockAppBalanceRequest", + name: (string) (len=24) "SetMockAppBalanceRequest", fields: ([]*main.Field) (len=1 cap=1) { - (*main.Field)(0xc00053b0e0)({ - name: (string) (len=6) "nodeId", + (*main.Field)(0xc0001db9b0)({ + name: (string) (len=6) "amount", kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, @@ -1446,12 +1446,12 @@ }) } }), - (string) (len=24) "AddAppUserInvoiceRequest": (*main.Message)(0xc000079240)({ - fullName: (string) (len=24) "AddAppUserInvoiceRequest", - name: (string) (len=24) "AddAppUserInvoiceRequest", - fields: ([]*main.Field) (len=4 cap=4) { - (*main.Field)(0xc00053b680)({ - name: (string) (len=19) "receiver_identifier", + (string) (len=17) "AddProductRequest": (*main.Message)(0xc0004617c0)({ + fullName: (string) (len=17) "AddProductRequest", + name: (string) (len=17) "AddProductRequest", + fields: ([]*main.Field) (len=2 cap=2) { + (*main.Field)(0xc0000b6810)({ + name: (string) (len=4) "name", kind: (string) (len=6) "string", isMap: (bool) false, isArray: (bool) false, @@ -1459,17 +1459,23 @@ isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc00053b6b0)({ - name: (string) (len=16) "payer_identifier", - kind: (string) (len=6) "string", + (*main.Field)(0xc0000b6840)({ + name: (string) (len=10) "price_sats", + kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false - }), - (*main.Field)(0xc00053b6e0)({ - name: (string) (len=17) "http_callback_url", + }) + } + }), + (string) (len=7) "AppUser": (*main.Message)(0xc000460e40)({ + fullName: (string) (len=7) "AppUser", + name: (string) (len=7) "AppUser", + fields: ([]*main.Field) (len=3 cap=4) { + (*main.Field)(0xc0001db560)({ + name: (string) (len=10) "identifier", kind: (string) (len=6) "string", isMap: (bool) false, isArray: (bool) false, @@ -1477,24 +1483,18 @@ isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc00053b710)({ - name: (string) (len=11) "invoice_req", - kind: (string) (len=17) "NewInvoiceRequest", + (*main.Field)(0xc0001db590)({ + name: (string) (len=4) "info", + kind: (string) (len=8) "UserInfo", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) true, isOptional: (bool) false - }) - } - }), - (string) (len=17) "GetAppUserRequest": (*main.Message)(0xc000079280)({ - fullName: (string) (len=17) "GetAppUserRequest", - name: (string) (len=17) "GetAppUserRequest", - fields: ([]*main.Field) (len=1 cap=1) { - (*main.Field)(0xc00053b740)({ - name: (string) (len=15) "user_identifier", - kind: (string) (len=6) "string", + }), + (*main.Field)(0xc0001db5c0)({ + name: (string) (len=16) "max_withdrawable", + kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, @@ -1503,12 +1503,12 @@ }) } }), - (string) (len=18) "PayAddressResponse": (*main.Message)(0xc000079500)({ - fullName: (string) (len=18) "PayAddressResponse", - name: (string) (len=18) "PayAddressResponse", - fields: ([]*main.Field) (len=4 cap=4) { - (*main.Field)(0xc00053bad0)({ - name: (string) (len=4) "txId", + (string) (len=26) "GetAppUserLNURLInfoRequest": (*main.Message)(0xc000461000)({ + fullName: (string) (len=26) "GetAppUserLNURLInfoRequest", + name: (string) (len=26) "GetAppUserLNURLInfoRequest", + fields: ([]*main.Field) (len=2 cap=2) { + (*main.Field)(0xc0001db8f0)({ + name: (string) (len=15) "user_identifier", kind: (string) (len=6) "string", isMap: (bool) false, isArray: (bool) false, @@ -1516,26 +1516,32 @@ isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc00053bb00)({ - name: (string) (len=12) "operation_id", + (*main.Field)(0xc0001db920)({ + name: (string) (len=17) "base_url_override", kind: (string) (len=6) "string", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false - }), - (*main.Field)(0xc00053bb30)({ - name: (string) (len=11) "service_fee", - kind: (string) (len=5) "int64", + }) + } + }), + (string) (len=27) "SetMockInvoiceAsPaidRequest": (*main.Message)(0xc000460bc0)({ + fullName: (string) (len=27) "SetMockInvoiceAsPaidRequest", + name: (string) (len=27) "SetMockInvoiceAsPaidRequest", + fields: ([]*main.Field) (len=2 cap=2) { + (*main.Field)(0xc0003d3c80)({ + name: (string) (len=7) "invoice", + kind: (string) (len=6) "string", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc00053bb60)({ - name: (string) (len=11) "network_fee", + (*main.Field)(0xc0003d3cb0)({ + name: (string) (len=6) "amount", kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, @@ -1545,21 +1551,42 @@ }) } }), - (string) (len=7) "Product": (*main.Message)(0xc000079b80)({ - fullName: (string) (len=7) "Product", - name: (string) (len=7) "Product", - fields: ([]*main.Field) (len=3 cap=4) { - (*main.Field)(0xc0005668a0)({ - name: (string) (len=2) "id", + (string) (len=17) "NewAddressRequest": (*main.Message)(0xc0004610c0)({ + fullName: (string) (len=17) "NewAddressRequest", + name: (string) (len=17) "NewAddressRequest", + fields: ([]*main.Field) (len=1 cap=1) { + (*main.Field)(0xc0001db9e0)({ + name: (string) (len=11) "addressType", + kind: (string) (len=11) "AddressType", + isMap: (bool) false, + isArray: (bool) false, + isEnum: (bool) true, + isMessage: (bool) false, + isOptional: (bool) false + }) + } + }), + (string) (len=25) "GetProductBuyLinkResponse": (*main.Message)(0xc000461840)({ + fullName: (string) (len=25) "GetProductBuyLinkResponse", + name: (string) (len=25) "GetProductBuyLinkResponse", + fields: ([]*main.Field) (len=1 cap=1) { + (*main.Field)(0xc0000b6900)({ + name: (string) (len=4) "link", kind: (string) (len=6) "string", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false - }), - (*main.Field)(0xc0005668d0)({ - name: (string) (len=4) "name", + }) + } + }), + (string) (len=9) "HttpCreds": (*main.Message)(0xc000461a40)({ + fullName: (string) (len=9) "HttpCreds", + name: (string) (len=9) "HttpCreds", + fields: ([]*main.Field) (len=2 cap=2) { + (*main.Field)(0xc0000b6ae0)({ + name: (string) (len=3) "url", kind: (string) (len=6) "string", isMap: (bool) false, isArray: (bool) false, @@ -1567,9 +1594,9 @@ isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc000566900)({ - name: (string) (len=10) "price_sats", - kind: (string) (len=5) "int64", + (*main.Field)(0xc0000b6b10)({ + name: (string) (len=5) "token", + kind: (string) (len=6) "string", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, @@ -1578,36 +1605,39 @@ }) } }), - (string) (len=11) "AppsMetrics": (*main.Message)(0xc000078b80)({ - fullName: (string) (len=11) "AppsMetrics", - name: (string) (len=11) "AppsMetrics", - fields: ([]*main.Field) (len=1 cap=1) { - (*main.Field)(0xc00053a720)({ - name: (string) (len=4) "apps", - kind: (string) (len=10) "AppMetrics", + (string) (len=10) "AppMetrics": (*main.Message)(0xc0004607c0)({ + fullName: (string) (len=10) "AppMetrics", + name: (string) (len=10) "AppMetrics", + fields: ([]*main.Field) (len=9 cap=16) { + (*main.Field)(0xc0003d30e0)({ + name: (string) (len=3) "app", + kind: (string) (len=11) "Application", isMap: (bool) false, - isArray: (bool) true, + isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) true, isOptional: (bool) false - }) - } - }), - (string) (len=11) "OpenChannel": (*main.Message)(0xc000078d40)({ - fullName: (string) (len=11) "OpenChannel", - name: (string) (len=11) "OpenChannel", - fields: ([]*main.Field) (len=6 cap=8) { - (*main.Field)(0xc00053ab70)({ - name: (string) (len=10) "channel_id", - kind: (string) (len=6) "string", + }), + (*main.Field)(0xc0003d3110)({ + name: (string) (len=5) "users", + kind: (string) (len=9) "UsersInfo", + isMap: (bool) false, + isArray: (bool) false, + isEnum: (bool) false, + isMessage: (bool) true, + isOptional: (bool) false + }), + (*main.Field)(0xc0003d3140)({ + name: (string) (len=8) "received", + kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc00053aba0)({ - name: (string) (len=8) "capacity", + (*main.Field)(0xc0003d3170)({ + name: (string) (len=5) "spent", kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, @@ -1615,17 +1645,17 @@ isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc00053abd0)({ - name: (string) (len=6) "active", - kind: (string) (len=4) "bool", + (*main.Field)(0xc0003d31a0)({ + name: (string) (len=9) "available", + kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc00053ac00)({ - name: (string) (len=8) "lifetime", + (*main.Field)(0xc0003d31d0)({ + name: (string) (len=4) "fees", kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, @@ -1633,8 +1663,8 @@ isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc00053ac30)({ - name: (string) (len=13) "local_balance", + (*main.Field)(0xc0003d3200)({ + name: (string) (len=8) "invoices", kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, @@ -1642,41 +1672,59 @@ isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc00053ac60)({ - name: (string) (len=14) "remote_balance", + (*main.Field)(0xc0003d3230)({ + name: (string) (len=10) "total_fees", kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false + }), + (*main.Field)(0xc0003d3260)({ + name: (string) (len=10) "operations", + kind: (string) (len=13) "UserOperation", + isMap: (bool) false, + isArray: (bool) true, + isEnum: (bool) false, + isMessage: (bool) true, + isOptional: (bool) false }) } }), - (string) (len=17) "AddAppUserRequest": (*main.Message)(0xc000079180)({ - fullName: (string) (len=17) "AddAppUserRequest", - name: (string) (len=17) "AddAppUserRequest", - fields: ([]*main.Field) (len=3 cap=4) { - (*main.Field)(0xc00053b4d0)({ - name: (string) (len=10) "identifier", - kind: (string) (len=6) "string", + (string) (len=17) "ChainBalanceEvent": (*main.Message)(0xc000460940)({ + fullName: (string) (len=17) "ChainBalanceEvent", + name: (string) (len=17) "ChainBalanceEvent", + fields: ([]*main.Field) (len=4 cap=4) { + (*main.Field)(0xc0003d3620)({ + name: (string) (len=12) "block_height", + kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc00053b500)({ - name: (string) (len=14) "fail_if_exists", - kind: (string) (len=4) "bool", + (*main.Field)(0xc0003d3650)({ + name: (string) (len=17) "confirmed_balance", + kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc00053b530)({ - name: (string) (len=7) "balance", + (*main.Field)(0xc0003d3680)({ + name: (string) (len=19) "unconfirmed_balance", + kind: (string) (len=5) "int64", + isMap: (bool) false, + isArray: (bool) false, + isEnum: (bool) false, + isMessage: (bool) false, + isOptional: (bool) false + }), + (*main.Field)(0xc0003d36b0)({ + name: (string) (len=13) "total_balance", kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, @@ -1686,21 +1734,42 @@ }) } }), - (string) (len=34) "SendAppUserToAppUserPaymentRequest": (*main.Message)(0xc000079300)({ - fullName: (string) (len=34) "SendAppUserToAppUserPaymentRequest", - name: (string) (len=34) "SendAppUserToAppUserPaymentRequest", - fields: ([]*main.Field) (len=3 cap=4) { - (*main.Field)(0xc00053b800)({ - name: (string) (len=20) "from_user_identifier", + (string) (len=17) "LndGetInfoRequest": (*main.Message)(0xc000460b80)({ + fullName: (string) (len=17) "LndGetInfoRequest", + name: (string) (len=17) "LndGetInfoRequest", + fields: ([]*main.Field) (len=1 cap=1) { + (*main.Field)(0xc0003d3c50)({ + name: (string) (len=6) "nodeId", + kind: (string) (len=5) "int64", + isMap: (bool) false, + isArray: (bool) false, + isEnum: (bool) false, + isMessage: (bool) false, + isOptional: (bool) false + }) + } + }), + (string) (len=18) "NewAddressResponse": (*main.Message)(0xc000461100)({ + fullName: (string) (len=18) "NewAddressResponse", + name: (string) (len=18) "NewAddressResponse", + fields: ([]*main.Field) (len=1 cap=1) { + (*main.Field)(0xc0001dba10)({ + name: (string) (len=7) "address", kind: (string) (len=6) "string", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false - }), - (*main.Field)(0xc00053b830)({ - name: (string) (len=18) "to_user_identifier", + }) + } + }), + (string) (len=14) "AuthAppRequest": (*main.Message)(0xc000460d40)({ + fullName: (string) (len=14) "AuthAppRequest", + name: (string) (len=14) "AuthAppRequest", + fields: ([]*main.Field) (len=2 cap=2) { + (*main.Field)(0xc0003d3ec0)({ + name: (string) (len=4) "name", kind: (string) (len=6) "string", isMap: (bool) false, isArray: (bool) false, @@ -1708,23 +1777,23 @@ isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc00053b860)({ - name: (string) (len=6) "amount", - kind: (string) (len=5) "int64", + (*main.Field)(0xc0003d3ef0)({ + name: (string) (len=19) "allow_user_creation", + kind: (string) (len=4) "bool", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, - isOptional: (bool) false + isOptional: (bool) true }) } }), - (string) (len=8) "UserInfo": (*main.Message)(0xc000079940)({ - fullName: (string) (len=8) "UserInfo", - name: (string) (len=8) "UserInfo", - fields: ([]*main.Field) (len=7 cap=8) { - (*main.Field)(0xc0005661e0)({ - name: (string) (len=6) "userId", + (string) (len=18) "PayAddressResponse": (*main.Message)(0xc000461180)({ + fullName: (string) (len=18) "PayAddressResponse", + name: (string) (len=18) "PayAddressResponse", + fields: ([]*main.Field) (len=4 cap=4) { + (*main.Field)(0xc0001dbad0)({ + name: (string) (len=4) "txId", kind: (string) (len=6) "string", isMap: (bool) false, isArray: (bool) false, @@ -1732,17 +1801,17 @@ isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc000566210)({ - name: (string) (len=7) "balance", - kind: (string) (len=5) "int64", + (*main.Field)(0xc0001dbb00)({ + name: (string) (len=12) "operation_id", + kind: (string) (len=6) "string", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc000566240)({ - name: (string) (len=16) "max_withdrawable", + (*main.Field)(0xc0001dbb30)({ + name: (string) (len=11) "service_fee", kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, @@ -1750,35 +1819,8 @@ isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc000566270)({ - name: (string) (len=15) "user_identifier", - kind: (string) (len=6) "string", - isMap: (bool) false, - isArray: (bool) false, - isEnum: (bool) false, - isMessage: (bool) false, - isOptional: (bool) false - }), - (*main.Field)(0xc0005662a0)({ - name: (string) (len=15) "service_fee_bps", - kind: (string) (len=5) "int64", - isMap: (bool) false, - isArray: (bool) false, - isEnum: (bool) false, - isMessage: (bool) false, - isOptional: (bool) false - }), - (*main.Field)(0xc0005662d0)({ - name: (string) (len=19) "network_max_fee_bps", - kind: (string) (len=5) "int64", - isMap: (bool) false, - isArray: (bool) false, - isEnum: (bool) false, - isMessage: (bool) false, - isOptional: (bool) false - }), - (*main.Field)(0xc000566300)({ - name: (string) (len=21) "network_max_fee_fixed", + (*main.Field)(0xc0001dbb60)({ + name: (string) (len=11) "network_fee", kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, @@ -1788,53 +1830,26 @@ }) } }), - (string) (len=19) "ChannelBalanceEvent": (*main.Message)(0xc000078c80)({ - fullName: (string) (len=19) "ChannelBalanceEvent", - name: (string) (len=19) "ChannelBalanceEvent", - fields: ([]*main.Field) (len=4 cap=4) { - (*main.Field)(0xc00053a9f0)({ - name: (string) (len=12) "block_height", - kind: (string) (len=5) "int64", - isMap: (bool) false, - isArray: (bool) false, - isEnum: (bool) false, - isMessage: (bool) false, - isOptional: (bool) false - }), - (*main.Field)(0xc00053aa20)({ - name: (string) (len=10) "channel_id", - kind: (string) (len=6) "string", - isMap: (bool) false, - isArray: (bool) false, - isEnum: (bool) false, - isMessage: (bool) false, - isOptional: (bool) false - }), - (*main.Field)(0xc00053aa50)({ - name: (string) (len=18) "local_balance_sats", - kind: (string) (len=5) "int64", - isMap: (bool) false, - isArray: (bool) false, - isEnum: (bool) false, - isMessage: (bool) false, - isOptional: (bool) false - }), - (*main.Field)(0xc00053aa80)({ - name: (string) (len=19) "remote_balance_sats", - kind: (string) (len=5) "int64", + (string) (len=11) "AppsMetrics": (*main.Message)(0xc000460800)({ + fullName: (string) (len=11) "AppsMetrics", + name: (string) (len=11) "AppsMetrics", + fields: ([]*main.Field) (len=1 cap=1) { + (*main.Field)(0xc0003d3290)({ + name: (string) (len=4) "apps", + kind: (string) (len=10) "AppMetrics", isMap: (bool) false, - isArray: (bool) false, + isArray: (bool) true, isEnum: (bool) false, - isMessage: (bool) false, + isMessage: (bool) true, isOptional: (bool) false }) } }), - (string) (len=14) "LndNodeMetrics": (*main.Message)(0xc000078e80)({ + (string) (len=14) "LndNodeMetrics": (*main.Message)(0xc000460b00)({ fullName: (string) (len=14) "LndNodeMetrics", name: (string) (len=14) "LndNodeMetrics", fields: ([]*main.Field) (len=9 cap=16) { - (*main.Field)(0xc00053af00)({ + (*main.Field)(0xc0003d3a70)({ name: (string) (len=23) "channels_balance_events", kind: (string) (len=19) "ChannelBalanceEvent", isMap: (bool) false, @@ -1843,7 +1858,7 @@ isMessage: (bool) true, isOptional: (bool) false }), - (*main.Field)(0xc00053af30)({ + (*main.Field)(0xc0003d3aa0)({ name: (string) (len=20) "chain_balance_events", kind: (string) (len=17) "ChainBalanceEvent", isMap: (bool) false, @@ -1852,7 +1867,7 @@ isMessage: (bool) true, isOptional: (bool) false }), - (*main.Field)(0xc00053af60)({ + (*main.Field)(0xc0003d3ad0)({ name: (string) (len=16) "offline_channels", kind: (string) (len=5) "int64", isMap: (bool) false, @@ -1861,7 +1876,7 @@ isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc00053af90)({ + (*main.Field)(0xc0003d3b00)({ name: (string) (len=15) "online_channels", kind: (string) (len=5) "int64", isMap: (bool) false, @@ -1870,7 +1885,7 @@ isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc00053afc0)({ + (*main.Field)(0xc0003d3b30)({ name: (string) (len=16) "pending_channels", kind: (string) (len=5) "int64", isMap: (bool) false, @@ -1879,7 +1894,7 @@ isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc00053aff0)({ + (*main.Field)(0xc0003d3b60)({ name: (string) (len=16) "closing_channels", kind: (string) (len=5) "int64", isMap: (bool) false, @@ -1888,7 +1903,7 @@ isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc00053b020)({ + (*main.Field)(0xc0003d3b90)({ name: (string) (len=13) "open_channels", kind: (string) (len=11) "OpenChannel", isMap: (bool) false, @@ -1897,7 +1912,7 @@ isMessage: (bool) true, isOptional: (bool) false }), - (*main.Field)(0xc00053b050)({ + (*main.Field)(0xc0003d3bc0)({ name: (string) (len=15) "closed_channels", kind: (string) (len=13) "ClosedChannel", isMap: (bool) false, @@ -1906,7 +1921,7 @@ isMessage: (bool) true, isOptional: (bool) false }), - (*main.Field)(0xc00053b080)({ + (*main.Field)(0xc0003d3bf0)({ name: (string) (len=15) "channel_routing", kind: (string) (len=14) "ChannelRouting", isMap: (bool) false, @@ -1917,21 +1932,12 @@ }) } }), - (string) (len=26) "GetAppUserLNURLInfoRequest": (*main.Message)(0xc000079380)({ - fullName: (string) (len=26) "GetAppUserLNURLInfoRequest", - name: (string) (len=26) "GetAppUserLNURLInfoRequest", - fields: ([]*main.Field) (len=2 cap=2) { - (*main.Field)(0xc00053b8f0)({ - name: (string) (len=15) "user_identifier", - kind: (string) (len=6) "string", - isMap: (bool) false, - isArray: (bool) false, - isEnum: (bool) false, - isMessage: (bool) false, - isOptional: (bool) false - }), - (*main.Field)(0xc00053b920)({ - name: (string) (len=17) "base_url_override", + (string) (len=18) "NewInvoiceResponse": (*main.Message)(0xc000461200)({ + fullName: (string) (len=18) "NewInvoiceResponse", + name: (string) (len=18) "NewInvoiceResponse", + fields: ([]*main.Field) (len=1 cap=1) { + (*main.Field)(0xc0001dbbf0)({ + name: (string) (len=7) "invoice", kind: (string) (len=6) "string", isMap: (bool) false, isArray: (bool) false, @@ -1941,45 +1947,45 @@ }) } }), - (string) (len=17) "NewInvoiceRequest": (*main.Message)(0xc000079540)({ - fullName: (string) (len=17) "NewInvoiceRequest", - name: (string) (len=17) "NewInvoiceRequest", + (string) (len=17) "LndMetricsRequest": (*main.Message)(0xc000460840)({ + fullName: (string) (len=17) "LndMetricsRequest", + name: (string) (len=17) "LndMetricsRequest", fields: ([]*main.Field) (len=2 cap=2) { - (*main.Field)(0xc00053bb90)({ - name: (string) (len=10) "amountSats", + (*main.Field)(0xc0003d32c0)({ + name: (string) (len=9) "from_unix", kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, - isOptional: (bool) false + isOptional: (bool) true }), - (*main.Field)(0xc00053bbc0)({ - name: (string) (len=4) "memo", - kind: (string) (len=6) "string", + (*main.Field)(0xc0003d32f0)({ + name: (string) (len=7) "to_unix", + kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, - isOptional: (bool) false + isOptional: (bool) true }) } }), - (string) (len=11) "UsageMetric": (*main.Message)(0xc0000782c0)({ - fullName: (string) (len=11) "UsageMetric", - name: (string) (len=11) "UsageMetric", - fields: ([]*main.Field) (len=9 cap=16) { - (*main.Field)(0xc00053a1e0)({ - name: (string) (len=15) "processed_at_ms", - kind: (string) (len=5) "int64", + (string) (len=11) "OpenChannel": (*main.Message)(0xc0004609c0)({ + fullName: (string) (len=11) "OpenChannel", + name: (string) (len=11) "OpenChannel", + fields: ([]*main.Field) (len=6 cap=8) { + (*main.Field)(0xc0003d36e0)({ + name: (string) (len=10) "channel_id", + kind: (string) (len=6) "string", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc00053a210)({ - name: (string) (len=14) "parsed_in_nano", + (*main.Field)(0xc0003d3710)({ + name: (string) (len=8) "capacity", kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, @@ -1987,17 +1993,17 @@ isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc00053a240)({ - name: (string) (len=12) "auth_in_nano", - kind: (string) (len=5) "int64", + (*main.Field)(0xc0003d3740)({ + name: (string) (len=6) "active", + kind: (string) (len=4) "bool", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc00053a270)({ - name: (string) (len=16) "validate_in_nano", + (*main.Field)(0xc0003d3770)({ + name: (string) (len=8) "lifetime", kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, @@ -2005,8 +2011,8 @@ isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc00053a2a0)({ - name: (string) (len=14) "handle_in_nano", + (*main.Field)(0xc0003d37a0)({ + name: (string) (len=13) "local_balance", kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, @@ -2014,122 +2020,77 @@ isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc00053a2d0)({ - name: (string) (len=8) "rpc_name", - kind: (string) (len=6) "string", + (*main.Field)(0xc0003d37d0)({ + name: (string) (len=14) "remote_balance", + kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false - }), - (*main.Field)(0xc00053a300)({ - name: (string) (len=5) "batch", - kind: (string) (len=4) "bool", + }) + } + }), + (string) (len=24) "GetUserOperationsRequest": (*main.Message)(0xc000461640)({ + fullName: (string) (len=24) "GetUserOperationsRequest", + name: (string) (len=24) "GetUserOperationsRequest", + fields: ([]*main.Field) (len=7 cap=8) { + (*main.Field)(0xc0000b6300)({ + name: (string) (len=21) "latestIncomingInvoice", + kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc00053a330)({ - name: (string) (len=5) "nostr", - kind: (string) (len=4) "bool", + (*main.Field)(0xc0000b6330)({ + name: (string) (len=21) "latestOutgoingInvoice", + kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc00053a360)({ - name: (string) (len=10) "batch_size", + (*main.Field)(0xc0000b6360)({ + name: (string) (len=16) "latestIncomingTx", kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false - }) - } - }), - (string) (len=18) "NewAddressResponse": (*main.Message)(0xc000079480)({ - fullName: (string) (len=18) "NewAddressResponse", - name: (string) (len=18) "NewAddressResponse", - fields: ([]*main.Field) (len=1 cap=1) { - (*main.Field)(0xc00053ba10)({ - name: (string) (len=7) "address", - kind: (string) (len=6) "string", - isMap: (bool) false, - isArray: (bool) false, - isEnum: (bool) false, - isMessage: (bool) false, - isOptional: (bool) false - }) - } - }), - (string) (len=15) "MigrationUpdate": (*main.Message)(0xc000079c40)({ - fullName: (string) (len=15) "MigrationUpdate", - name: (string) (len=15) "MigrationUpdate", - fields: ([]*main.Field) (len=2 cap=2) { - (*main.Field)(0xc0005669c0)({ - name: (string) (len=7) "closure", - kind: (string) (len=16) "ClosureMigration", - isMap: (bool) false, - isArray: (bool) false, - isEnum: (bool) false, - isMessage: (bool) true, - isOptional: (bool) true }), - (*main.Field)(0xc0005669f0)({ - name: (string) (len=6) "relays", - kind: (string) (len=15) "RelaysMigration", - isMap: (bool) false, - isArray: (bool) false, - isEnum: (bool) false, - isMessage: (bool) true, - isOptional: (bool) true - }) - } - }), - (string) (len=31) "RequestNPubLinkingTokenResponse": (*main.Message)(0xc000079d40)({ - fullName: (string) (len=31) "RequestNPubLinkingTokenResponse", - name: (string) (len=31) "RequestNPubLinkingTokenResponse", - fields: ([]*main.Field) (len=1 cap=1) { - (*main.Field)(0xc000566ab0)({ - name: (string) (len=5) "token", - kind: (string) (len=6) "string", + (*main.Field)(0xc0000b6390)({ + name: (string) (len=16) "latestOutgoingTx", + kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false - }) - } - }), - (string) (len=24) "PayAppUserInvoiceRequest": (*main.Message)(0xc0000792c0)({ - fullName: (string) (len=24) "PayAppUserInvoiceRequest", - name: (string) (len=24) "PayAppUserInvoiceRequest", - fields: ([]*main.Field) (len=3 cap=4) { - (*main.Field)(0xc00053b770)({ - name: (string) (len=15) "user_identifier", - kind: (string) (len=6) "string", + }), + (*main.Field)(0xc0000b63c0)({ + name: (string) (len=31) "latestIncomingUserToUserPayment", + kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc00053b7a0)({ - name: (string) (len=7) "invoice", - kind: (string) (len=6) "string", + (*main.Field)(0xc0000b63f0)({ + name: (string) (len=31) "latestOutgoingUserToUserPayment", + kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc00053b7d0)({ - name: (string) (len=6) "amount", + (*main.Field)(0xc0000b6420)({ + name: (string) (len=8) "max_size", kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, @@ -2139,27 +2100,12 @@ }) } }), - (string) (len=17) "NewAddressRequest": (*main.Message)(0xc000079440)({ - fullName: (string) (len=17) "NewAddressRequest", - name: (string) (len=17) "NewAddressRequest", - fields: ([]*main.Field) (len=1 cap=1) { - (*main.Field)(0xc00053b9e0)({ - name: (string) (len=11) "addressType", - kind: (string) (len=11) "AddressType", - isMap: (bool) false, - isArray: (bool) false, - isEnum: (bool) true, - isMessage: (bool) false, - isOptional: (bool) false - }) - } - }), - (string) (len=22) "HandleLnurlPayResponse": (*main.Message)(0xc0000798c0)({ - fullName: (string) (len=22) "HandleLnurlPayResponse", - name: (string) (len=22) "HandleLnurlPayResponse", - fields: ([]*main.Field) (len=2 cap=2) { - (*main.Field)(0xc000566180)({ - name: (string) (len=2) "pr", + (string) (len=14) "ChannelRouting": (*main.Message)(0xc000460a80)({ + fullName: (string) (len=14) "ChannelRouting", + name: (string) (len=14) "ChannelRouting", + fields: ([]*main.Field) (len=10 cap=16) { + (*main.Field)(0xc0003d3890)({ + name: (string) (len=10) "channel_id", kind: (string) (len=6) "string", isMap: (bool) false, isArray: (bool) false, @@ -2167,23 +2113,8 @@ isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc0005661b0)({ - name: (string) (len=6) "routes", - kind: (string) (len=5) "Empty", - isMap: (bool) false, - isArray: (bool) true, - isEnum: (bool) false, - isMessage: (bool) true, - isOptional: (bool) false - }) - } - }), - (string) (len=13) "UserOperation": (*main.Message)(0xc000079a40)({ - fullName: (string) (len=13) "UserOperation", - name: (string) (len=13) "UserOperation", - fields: ([]*main.Field) (len=11 cap=16) { - (*main.Field)(0xc000566480)({ - name: (string) (len=10) "paidAtUnix", + (*main.Field)(0xc0003d38c0)({ + name: (string) (len=11) "send_errors", kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, @@ -2191,26 +2122,26 @@ isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc0005664b0)({ - name: (string) (len=4) "type", - kind: (string) (len=17) "UserOperationType", + (*main.Field)(0xc0003d38f0)({ + name: (string) (len=14) "receive_errors", + kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, - isEnum: (bool) true, + isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc0005664e0)({ - name: (string) (len=7) "inbound", - kind: (string) (len=4) "bool", + (*main.Field)(0xc0003d3920)({ + name: (string) (len=23) "forward_errors_as_input", + kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc000566510)({ - name: (string) (len=6) "amount", + (*main.Field)(0xc0003d3950)({ + name: (string) (len=24) "forward_errors_as_output", kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, @@ -2218,26 +2149,26 @@ isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc000566540)({ - name: (string) (len=10) "identifier", - kind: (string) (len=6) "string", + (*main.Field)(0xc0003d3980)({ + name: (string) (len=27) "missed_forward_fee_as_input", + kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc000566570)({ - name: (string) (len=11) "operationId", - kind: (string) (len=6) "string", + (*main.Field)(0xc0003d39b0)({ + name: (string) (len=28) "missed_forward_fee_as_output", + kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc0005665a0)({ - name: (string) (len=11) "service_fee", + (*main.Field)(0xc0003d39e0)({ + name: (string) (len=20) "forward_fee_as_input", kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, @@ -2245,8 +2176,8 @@ isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc0005665d0)({ - name: (string) (len=11) "network_fee", + (*main.Field)(0xc0003d3a10)({ + name: (string) (len=21) "forward_fee_as_output", kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, @@ -2254,17 +2185,23 @@ isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc000566600)({ - name: (string) (len=9) "confirmed", - kind: (string) (len=4) "bool", + (*main.Field)(0xc0003d3a40)({ + name: (string) (len=13) "events_number", + kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false - }), - (*main.Field)(0xc000566630)({ - name: (string) (len=7) "tx_hash", + }) + } + }), + (string) (len=20) "LnurlPayInfoResponse": (*main.Message)(0xc000461500)({ + fullName: (string) (len=20) "LnurlPayInfoResponse", + name: (string) (len=20) "LnurlPayInfoResponse", + fields: ([]*main.Field) (len=7 cap=8) { + (*main.Field)(0xc0000b6000)({ + name: (string) (len=3) "tag", kind: (string) (len=6) "string", isMap: (bool) false, isArray: (bool) false, @@ -2272,53 +2209,35 @@ isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc000566660)({ - name: (string) (len=8) "internal", - kind: (string) (len=4) "bool", + (*main.Field)(0xc0000b6030)({ + name: (string) (len=8) "callback", + kind: (string) (len=6) "string", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false - }) - } - }), - (string) (len=16) "ClosureMigration": (*main.Message)(0xc000079c80)({ - fullName: (string) (len=16) "ClosureMigration", - name: (string) (len=16) "ClosureMigration", - fields: ([]*main.Field) (len=1 cap=1) { - (*main.Field)(0xc000566a20)({ - name: (string) (len=14) "closes_at_unix", + }), + (*main.Field)(0xc0000b6060)({ + name: (string) (len=11) "maxSendable", kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false - }) - } - }), - (string) (len=14) "BanUserRequest": (*main.Message)(0xc000078fc0)({ - fullName: (string) (len=14) "BanUserRequest", - name: (string) (len=14) "BanUserRequest", - fields: ([]*main.Field) (len=1 cap=1) { - (*main.Field)(0xc00053b1a0)({ - name: (string) (len=7) "user_id", - kind: (string) (len=6) "string", + }), + (*main.Field)(0xc0000b6090)({ + name: (string) (len=11) "minSendable", + kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false - }) - } - }), - (string) (len=13) "AddAppRequest": (*main.Message)(0xc000079080)({ - fullName: (string) (len=13) "AddAppRequest", - name: (string) (len=13) "AddAppRequest", - fields: ([]*main.Field) (len=2 cap=2) { - (*main.Field)(0xc00053b2f0)({ - name: (string) (len=4) "name", + }), + (*main.Field)(0xc0000b60c0)({ + name: (string) (len=8) "metadata", kind: (string) (len=6) "string", isMap: (bool) false, isArray: (bool) false, @@ -2326,22 +2245,31 @@ isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc00053b320)({ - name: (string) (len=19) "allow_user_creation", + (*main.Field)(0xc0000b60f0)({ + name: (string) (len=11) "allowsNostr", kind: (string) (len=4) "bool", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false + }), + (*main.Field)(0xc0000b6120)({ + name: (string) (len=11) "nostrPubkey", + kind: (string) (len=6) "string", + isMap: (bool) false, + isArray: (bool) false, + isEnum: (bool) false, + isMessage: (bool) false, + isOptional: (bool) false }) } }), - (string) (len=18) "PayInvoiceResponse": (*main.Message)(0xc0000796c0)({ + (string) (len=18) "PayInvoiceResponse": (*main.Message)(0xc000461340)({ fullName: (string) (len=18) "PayInvoiceResponse", name: (string) (len=18) "PayInvoiceResponse", - fields: ([]*main.Field) (len=6 cap=8) { - (*main.Field)(0xc00053bce0)({ + fields: ([]*main.Field) (len=5 cap=8) { + (*main.Field)(0xc0001dbce0)({ name: (string) (len=8) "preimage", kind: (string) (len=6) "string", isMap: (bool) false, @@ -2350,7 +2278,7 @@ isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc00053bd10)({ + (*main.Field)(0xc0001dbd10)({ name: (string) (len=11) "amount_paid", kind: (string) (len=5) "int64", isMap: (bool) false, @@ -2359,7 +2287,7 @@ isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc00053bd40)({ + (*main.Field)(0xc0001dbd40)({ name: (string) (len=12) "operation_id", kind: (string) (len=6) "string", isMap: (bool) false, @@ -2368,7 +2296,7 @@ isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc00053bd70)({ + (*main.Field)(0xc0001dbd70)({ name: (string) (len=11) "service_fee", kind: (string) (len=5) "int64", isMap: (bool) false, @@ -2377,7 +2305,7 @@ isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc00053bda0)({ + (*main.Field)(0xc0001dbda0)({ name: (string) (len=11) "network_fee", kind: (string) (len=5) "int64", isMap: (bool) false, @@ -2385,10 +2313,25 @@ isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false + }) + } + }), + (string) (len=17) "LnurlLinkResponse": (*main.Message)(0xc000461400)({ + fullName: (string) (len=17) "LnurlLinkResponse", + name: (string) (len=17) "LnurlLinkResponse", + fields: ([]*main.Field) (len=2 cap=2) { + (*main.Field)(0xc0001dbec0)({ + name: (string) (len=5) "lnurl", + kind: (string) (len=6) "string", + isMap: (bool) false, + isArray: (bool) false, + isEnum: (bool) false, + isMessage: (bool) false, + isOptional: (bool) false }), - (*main.Field)(0xc00053bdd0)({ - name: (string) (len=14) "latest_balance", - kind: (string) (len=5) "int64", + (*main.Field)(0xc0001dbef0)({ + name: (string) (len=2) "k1", + kind: (string) (len=6) "string", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, @@ -2397,27 +2340,27 @@ }) } }), - (string) (len=19) "OpenChannelResponse": (*main.Message)(0xc000079740)({ - fullName: (string) (len=19) "OpenChannelResponse", - name: (string) (len=19) "OpenChannelResponse", + (string) (len=15) "RelaysMigration": (*main.Message)(0xc000461940)({ + fullName: (string) (len=15) "RelaysMigration", + name: (string) (len=15) "RelaysMigration", fields: ([]*main.Field) (len=1 cap=1) { - (*main.Field)(0xc00053bec0)({ - name: (string) (len=9) "channelId", + (*main.Field)(0xc0000b69f0)({ + name: (string) (len=6) "relays", kind: (string) (len=6) "string", isMap: (bool) false, - isArray: (bool) false, + isArray: (bool) true, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false }) } }), - (string) (len=25) "GetProductBuyLinkResponse": (*main.Message)(0xc000079bc0)({ - fullName: (string) (len=25) "GetProductBuyLinkResponse", - name: (string) (len=25) "GetProductBuyLinkResponse", + (string) (len=31) "RequestNPubLinkingTokenResponse": (*main.Message)(0xc0004619c0)({ + fullName: (string) (len=31) "RequestNPubLinkingTokenResponse", + name: (string) (len=31) "RequestNPubLinkingTokenResponse", fields: ([]*main.Field) (len=1 cap=1) { - (*main.Field)(0xc000566930)({ - name: (string) (len=4) "link", + (*main.Field)(0xc0000b6a50)({ + name: (string) (len=5) "token", kind: (string) (len=6) "string", isMap: (bool) false, isArray: (bool) false, @@ -2427,36 +2370,30 @@ }) } }), - (string) (len=17) "LiveUserOperation": (*main.Message)(0xc000079c00)({ - fullName: (string) (len=17) "LiveUserOperation", - name: (string) (len=17) "LiveUserOperation", - fields: ([]*main.Field) (len=2 cap=2) { - (*main.Field)(0xc000566960)({ - name: (string) (len=9) "operation", - kind: (string) (len=13) "UserOperation", + (string) (len=13) "BannedAppUser": (*main.Message)(0xc000460c80)({ + fullName: (string) (len=13) "BannedAppUser", + name: (string) (len=13) "BannedAppUser", + fields: ([]*main.Field) (len=4 cap=4) { + (*main.Field)(0xc0003d3d40)({ + name: (string) (len=8) "app_name", + kind: (string) (len=6) "string", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, - isMessage: (bool) true, + isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc000566990)({ - name: (string) (len=14) "latest_balance", - kind: (string) (len=5) "int64", + (*main.Field)(0xc0003d3d70)({ + name: (string) (len=6) "app_id", + kind: (string) (len=6) "string", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false - }) - } - }), - (string) (len=13) "ClosedChannel": (*main.Message)(0xc000078d80)({ - fullName: (string) (len=13) "ClosedChannel", - name: (string) (len=13) "ClosedChannel", - fields: ([]*main.Field) (len=3 cap=4) { - (*main.Field)(0xc00053ac90)({ - name: (string) (len=10) "channel_id", + }), + (*main.Field)(0xc0003d3da0)({ + name: (string) (len=15) "user_identifier", kind: (string) (len=6) "string", isMap: (bool) false, isArray: (bool) false, @@ -2464,47 +2401,41 @@ isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc00053acc0)({ - name: (string) (len=8) "capacity", - kind: (string) (len=5) "int64", + (*main.Field)(0xc0003d3dd0)({ + name: (string) (len=9) "nostr_pub", + kind: (string) (len=6) "string", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false - }), - (*main.Field)(0xc00053acf0)({ - name: (string) (len=13) "closed_height", - kind: (string) (len=5) "int64", + }) + } + }), + (string) (len=11) "Application": (*main.Message)(0xc000460d80)({ + fullName: (string) (len=11) "Application", + name: (string) (len=11) "Application", + fields: ([]*main.Field) (len=4 cap=4) { + (*main.Field)(0xc0003d3f20)({ + name: (string) (len=4) "name", + kind: (string) (len=6) "string", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false - }) - } - }), - (string) (len=10) "LndMetrics": (*main.Message)(0xc000078ec0)({ - fullName: (string) (len=10) "LndMetrics", - name: (string) (len=10) "LndMetrics", - fields: ([]*main.Field) (len=1 cap=1) { - (*main.Field)(0xc00053b0b0)({ - name: (string) (len=5) "nodes", - kind: (string) (len=14) "LndNodeMetrics", + }), + (*main.Field)(0xc0003d3f50)({ + name: (string) (len=2) "id", + kind: (string) (len=6) "string", isMap: (bool) false, - isArray: (bool) true, + isArray: (bool) false, isEnum: (bool) false, - isMessage: (bool) true, + isMessage: (bool) false, isOptional: (bool) false - }) - } - }), - (string) (len=15) "BanUserResponse": (*main.Message)(0xc000079040)({ - fullName: (string) (len=15) "BanUserResponse", - name: (string) (len=15) "BanUserResponse", - fields: ([]*main.Field) (len=2 cap=2) { - (*main.Field)(0xc00053b290)({ - name: (string) (len=12) "balance_sats", + }), + (*main.Field)(0xc0003d3f80)({ + name: (string) (len=7) "balance", kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, @@ -2512,23 +2443,23 @@ isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc00053b2c0)({ - name: (string) (len=16) "banned_app_users", - kind: (string) (len=13) "BannedAppUser", + (*main.Field)(0xc0003d3fb0)({ + name: (string) (len=4) "npub", + kind: (string) (len=6) "string", isMap: (bool) false, - isArray: (bool) true, + isArray: (bool) false, isEnum: (bool) false, - isMessage: (bool) true, + isMessage: (bool) false, isOptional: (bool) false }) } }), - (string) (len=30) "SendAppUserToAppPaymentRequest": (*main.Message)(0xc000079340)({ - fullName: (string) (len=30) "SendAppUserToAppPaymentRequest", - name: (string) (len=30) "SendAppUserToAppPaymentRequest", - fields: ([]*main.Field) (len=2 cap=2) { - (*main.Field)(0xc00053b890)({ - name: (string) (len=20) "from_user_identifier", + (string) (len=17) "PayAddressRequest": (*main.Message)(0xc000461140)({ + fullName: (string) (len=17) "PayAddressRequest", + name: (string) (len=17) "PayAddressRequest", + fields: ([]*main.Field) (len=3 cap=4) { + (*main.Field)(0xc0001dba40)({ + name: (string) (len=7) "address", kind: (string) (len=6) "string", isMap: (bool) false, isArray: (bool) false, @@ -2536,8 +2467,17 @@ isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc00053b8c0)({ - name: (string) (len=6) "amount", + (*main.Field)(0xc0001dba70)({ + name: (string) (len=9) "amoutSats", + kind: (string) (len=5) "int64", + isMap: (bool) false, + isArray: (bool) false, + isEnum: (bool) false, + isMessage: (bool) false, + isOptional: (bool) false + }), + (*main.Field)(0xc0001dbaa0)({ + name: (string) (len=12) "satsPerVByte", kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, @@ -2547,69 +2487,69 @@ }) } }), - (string) (len=17) "LndMetricsRequest": (*main.Message)(0xc000078bc0)({ - fullName: (string) (len=17) "LndMetricsRequest", - name: (string) (len=17) "LndMetricsRequest", - fields: ([]*main.Field) (len=2 cap=2) { - (*main.Field)(0xc00053a750)({ - name: (string) (len=9) "from_unix", - kind: (string) (len=5) "int64", + (string) (len=18) "OpenChannelRequest": (*main.Message)(0xc000461380)({ + fullName: (string) (len=18) "OpenChannelRequest", + name: (string) (len=18) "OpenChannelRequest", + fields: ([]*main.Field) (len=4 cap=4) { + (*main.Field)(0xc0001dbdd0)({ + name: (string) (len=11) "destination", + kind: (string) (len=6) "string", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, - isOptional: (bool) true + isOptional: (bool) false }), - (*main.Field)(0xc00053a780)({ - name: (string) (len=7) "to_unix", + (*main.Field)(0xc0001dbe00)({ + name: (string) (len=13) "fundingAmount", kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, - isOptional: (bool) true - }) - } - }), - (string) (len=14) "AuthAppRequest": (*main.Message)(0xc0000790c0)({ - fullName: (string) (len=14) "AuthAppRequest", - name: (string) (len=14) "AuthAppRequest", - fields: ([]*main.Field) (len=2 cap=2) { - (*main.Field)(0xc00053b350)({ - name: (string) (len=4) "name", - kind: (string) (len=6) "string", + isOptional: (bool) false + }), + (*main.Field)(0xc0001dbe30)({ + name: (string) (len=10) "pushAmount", + kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc00053b380)({ - name: (string) (len=19) "allow_user_creation", - kind: (string) (len=4) "bool", + (*main.Field)(0xc0001dbe60)({ + name: (string) (len=12) "closeAddress", + kind: (string) (len=6) "string", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, - isOptional: (bool) true + isOptional: (bool) false }) } }), - (string) (len=9) "HttpCreds": (*main.Message)(0xc000079dc0)({ - fullName: (string) (len=9) "HttpCreds", - name: (string) (len=9) "HttpCreds", - fields: ([]*main.Field) (len=2 cap=2) { - (*main.Field)(0xc000566b40)({ - name: (string) (len=3) "url", - kind: (string) (len=6) "string", + (string) (len=10) "LndMetrics": (*main.Message)(0xc000460b40)({ + fullName: (string) (len=10) "LndMetrics", + name: (string) (len=10) "LndMetrics", + fields: ([]*main.Field) (len=1 cap=1) { + (*main.Field)(0xc0003d3c20)({ + name: (string) (len=5) "nodes", + kind: (string) (len=14) "LndNodeMetrics", isMap: (bool) false, - isArray: (bool) false, + isArray: (bool) true, isEnum: (bool) false, - isMessage: (bool) false, + isMessage: (bool) true, isOptional: (bool) false - }), - (*main.Field)(0xc000566b70)({ - name: (string) (len=5) "token", + }) + } + }), + (string) (len=18) "LndGetInfoResponse": (*main.Message)(0xc000460c00)({ + fullName: (string) (len=18) "LndGetInfoResponse", + name: (string) (len=18) "LndGetInfoResponse", + fields: ([]*main.Field) (len=1 cap=1) { + (*main.Field)(0xc0003d3ce0)({ + name: (string) (len=5) "alias", kind: (string) (len=6) "string", isMap: (bool) false, isArray: (bool) false, @@ -2619,11 +2559,11 @@ }) } }), - (string) (len=18) "AppsMetricsRequest": (*main.Message)(0xc000078400)({ + (string) (len=18) "AppsMetricsRequest": (*main.Message)(0xc0004606c0)({ fullName: (string) (len=18) "AppsMetricsRequest", name: (string) (len=18) "AppsMetricsRequest", fields: ([]*main.Field) (len=3 cap=4) { - (*main.Field)(0xc00053a3c0)({ + (*main.Field)(0xc0003d2f30)({ name: (string) (len=9) "from_unix", kind: (string) (len=5) "int64", isMap: (bool) false, @@ -2632,7 +2572,7 @@ isMessage: (bool) false, isOptional: (bool) true }), - (*main.Field)(0xc00053a3f0)({ + (*main.Field)(0xc0003d2f60)({ name: (string) (len=7) "to_unix", kind: (string) (len=5) "int64", isMap: (bool) false, @@ -2641,7 +2581,7 @@ isMessage: (bool) false, isOptional: (bool) true }), - (*main.Field)(0xc00053a420)({ + (*main.Field)(0xc0003d2f90)({ name: (string) (len=18) "include_operations", kind: (string) (len=4) "bool", isMap: (bool) false, @@ -2652,12 +2592,12 @@ }) } }), - (string) (len=24) "GetUserOperationsRequest": (*main.Message)(0xc0000799c0)({ - fullName: (string) (len=24) "GetUserOperationsRequest", - name: (string) (len=24) "GetUserOperationsRequest", - fields: ([]*main.Field) (len=7 cap=8) { - (*main.Field)(0xc000566330)({ - name: (string) (len=21) "latestIncomingInvoice", + (string) (len=12) "RoutingEvent": (*main.Message)(0xc0004608c0)({ + fullName: (string) (len=12) "RoutingEvent", + name: (string) (len=12) "RoutingEvent", + fields: ([]*main.Field) (len=12 cap=16) { + (*main.Field)(0xc0003d3320)({ + name: (string) (len=19) "incoming_channel_id", kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, @@ -2665,8 +2605,8 @@ isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc000566360)({ - name: (string) (len=21) "latestOutgoingInvoice", + (*main.Field)(0xc0003d3350)({ + name: (string) (len=16) "incoming_htlc_id", kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, @@ -2674,8 +2614,8 @@ isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc000566390)({ - name: (string) (len=16) "latestIncomingTx", + (*main.Field)(0xc0003d3380)({ + name: (string) (len=19) "outgoing_channel_id", kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, @@ -2683,8 +2623,8 @@ isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc0005663c0)({ - name: (string) (len=16) "latestOutgoingTx", + (*main.Field)(0xc0003d33b0)({ + name: (string) (len=16) "outgoing_htlc_id", kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, @@ -2692,8 +2632,8 @@ isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc0005663f0)({ - name: (string) (len=31) "latestIncomingUserToUserPayment", + (*main.Field)(0xc0003d33e0)({ + name: (string) (len=12) "timestamp_ns", kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, @@ -2701,59 +2641,35 @@ isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc000566420)({ - name: (string) (len=31) "latestOutgoingUserToUserPayment", - kind: (string) (len=5) "int64", + (*main.Field)(0xc0003d3410)({ + name: (string) (len=10) "event_type", + kind: (string) (len=6) "string", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc000566450)({ - name: (string) (len=8) "max_size", + (*main.Field)(0xc0003d3440)({ + name: (string) (len=17) "incoming_amt_msat", kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false - }) - } - }), - (string) (len=25) "LnurlWithdrawInfoResponse": (*main.Message)(0xc000079800)({ - fullName: (string) (len=25) "LnurlWithdrawInfoResponse", - name: (string) (len=25) "LnurlWithdrawInfoResponse", - fields: ([]*main.Field) (len=8 cap=8) { - (*main.Field)(0xc00053bf50)({ - name: (string) (len=3) "tag", - kind: (string) (len=6) "string", - isMap: (bool) false, - isArray: (bool) false, - isEnum: (bool) false, - isMessage: (bool) false, - isOptional: (bool) false - }), - (*main.Field)(0xc00053bf80)({ - name: (string) (len=8) "callback", - kind: (string) (len=6) "string", - isMap: (bool) false, - isArray: (bool) false, - isEnum: (bool) false, - isMessage: (bool) false, - isOptional: (bool) false }), - (*main.Field)(0xc00053bfb0)({ - name: (string) (len=2) "k1", - kind: (string) (len=6) "string", + (*main.Field)(0xc0003d3470)({ + name: (string) (len=17) "outgoing_amt_msat", + kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc000076000)({ - name: (string) (len=18) "defaultDescription", + (*main.Field)(0xc0003d34a0)({ + name: (string) (len=14) "failure_string", kind: (string) (len=6) "string", isMap: (bool) false, isArray: (bool) false, @@ -2761,36 +2677,42 @@ isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc00034aff0)({ - name: (string) (len=15) "minWithdrawable", - kind: (string) (len=5) "int64", + (*main.Field)(0xc0003d34d0)({ + name: (string) (len=7) "settled", + kind: (string) (len=4) "bool", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc00034b200)({ - name: (string) (len=15) "maxWithdrawable", - kind: (string) (len=5) "int64", + (*main.Field)(0xc0003d3500)({ + name: (string) (len=8) "offchain", + kind: (string) (len=4) "bool", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc00034b230)({ - name: (string) (len=12) "balanceCheck", - kind: (string) (len=6) "string", + (*main.Field)(0xc0003d3530)({ + name: (string) (len=18) "forward_fail_event", + kind: (string) (len=4) "bool", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false - }), - (*main.Field)(0xc000566000)({ - name: (string) (len=7) "payLink", - kind: (string) (len=6) "string", + }) + } + }), + (string) (len=16) "ClosureMigration": (*main.Message)(0xc000461900)({ + fullName: (string) (len=16) "ClosureMigration", + name: (string) (len=16) "ClosureMigration", + fields: ([]*main.Field) (len=1 cap=1) { + (*main.Field)(0xc0000b69c0)({ + name: (string) (len=14) "closes_at_unix", + kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, @@ -2799,11 +2721,11 @@ }) } }), - (string) (len=14) "ChannelRouting": (*main.Message)(0xc000078e00)({ - fullName: (string) (len=14) "ChannelRouting", - name: (string) (len=14) "ChannelRouting", - fields: ([]*main.Field) (len=10 cap=16) { - (*main.Field)(0xc00053ad20)({ + (string) (len=13) "ClosedChannel": (*main.Message)(0xc000460a00)({ + fullName: (string) (len=13) "ClosedChannel", + name: (string) (len=13) "ClosedChannel", + fields: ([]*main.Field) (len=3 cap=4) { + (*main.Field)(0xc0003d3800)({ name: (string) (len=10) "channel_id", kind: (string) (len=6) "string", isMap: (bool) false, @@ -2812,8 +2734,8 @@ isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc00053ad50)({ - name: (string) (len=11) "send_errors", + (*main.Field)(0xc0003d3830)({ + name: (string) (len=8) "capacity", kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, @@ -2821,44 +2743,62 @@ isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc00053ad80)({ - name: (string) (len=14) "receive_errors", + (*main.Field)(0xc0003d3860)({ + name: (string) (len=13) "closed_height", kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false - }), - (*main.Field)(0xc00053adb0)({ - name: (string) (len=23) "forward_errors_as_input", - kind: (string) (len=5) "int64", + }) + } + }), + (string) (len=13) "AddAppRequest": (*main.Message)(0xc000460d00)({ + fullName: (string) (len=13) "AddAppRequest", + name: (string) (len=13) "AddAppRequest", + fields: ([]*main.Field) (len=2 cap=2) { + (*main.Field)(0xc0003d3e60)({ + name: (string) (len=4) "name", + kind: (string) (len=6) "string", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc00053ade0)({ - name: (string) (len=24) "forward_errors_as_output", - kind: (string) (len=5) "int64", + (*main.Field)(0xc0003d3e90)({ + name: (string) (len=19) "allow_user_creation", + kind: (string) (len=4) "bool", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false - }), - (*main.Field)(0xc00053ae10)({ - name: (string) (len=27) "missed_forward_fee_as_input", - kind: (string) (len=5) "int64", + }) + } + }), + (string) (len=14) "BanUserRequest": (*main.Message)(0xc000460c40)({ + fullName: (string) (len=14) "BanUserRequest", + name: (string) (len=14) "BanUserRequest", + fields: ([]*main.Field) (len=1 cap=1) { + (*main.Field)(0xc0003d3d10)({ + name: (string) (len=7) "user_id", + kind: (string) (len=6) "string", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false - }), - (*main.Field)(0xc00053ae40)({ - name: (string) (len=28) "missed_forward_fee_as_output", + }) + } + }), + (string) (len=15) "BanUserResponse": (*main.Message)(0xc000460cc0)({ + fullName: (string) (len=15) "BanUserResponse", + name: (string) (len=15) "BanUserResponse", + fields: ([]*main.Field) (len=2 cap=2) { + (*main.Field)(0xc0003d3e00)({ + name: (string) (len=12) "balance_sats", kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, @@ -2866,26 +2806,41 @@ isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc00053ae70)({ - name: (string) (len=20) "forward_fee_as_input", - kind: (string) (len=5) "int64", + (*main.Field)(0xc0003d3e30)({ + name: (string) (len=16) "banned_app_users", + kind: (string) (len=13) "BannedAppUser", + isMap: (bool) false, + isArray: (bool) true, + isEnum: (bool) false, + isMessage: (bool) true, + isOptional: (bool) false + }) + } + }), + (string) (len=17) "AddAppUserRequest": (*main.Message)(0xc000460e00)({ + fullName: (string) (len=17) "AddAppUserRequest", + name: (string) (len=17) "AddAppUserRequest", + fields: ([]*main.Field) (len=3 cap=4) { + (*main.Field)(0xc0001db4d0)({ + name: (string) (len=10) "identifier", + kind: (string) (len=6) "string", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc00053aea0)({ - name: (string) (len=21) "forward_fee_as_output", - kind: (string) (len=5) "int64", + (*main.Field)(0xc0001db500)({ + name: (string) (len=14) "fail_if_exists", + kind: (string) (len=4) "bool", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc00053aed0)({ - name: (string) (len=13) "events_number", + (*main.Field)(0xc0001db530)({ + name: (string) (len=7) "balance", kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, @@ -2895,12 +2850,12 @@ }) } }), - (string) (len=20) "LnurlPayInfoResponse": (*main.Message)(0xc000079880)({ - fullName: (string) (len=20) "LnurlPayInfoResponse", - name: (string) (len=20) "LnurlPayInfoResponse", - fields: ([]*main.Field) (len=7 cap=8) { - (*main.Field)(0xc000566030)({ - name: (string) (len=3) "tag", + (string) (len=28) "SetMockAppUserBalanceRequest": (*main.Message)(0xc000461040)({ + fullName: (string) (len=28) "SetMockAppUserBalanceRequest", + name: (string) (len=28) "SetMockAppUserBalanceRequest", + fields: ([]*main.Field) (len=2 cap=2) { + (*main.Field)(0xc0001db950)({ + name: (string) (len=15) "user_identifier", kind: (string) (len=6) "string", isMap: (bool) false, isArray: (bool) false, @@ -2908,35 +2863,47 @@ isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc000566060)({ - name: (string) (len=8) "callback", - kind: (string) (len=6) "string", + (*main.Field)(0xc0001db980)({ + name: (string) (len=6) "amount", + kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false - }), - (*main.Field)(0xc000566090)({ - name: (string) (len=11) "maxSendable", - kind: (string) (len=5) "int64", + }) + } + }), + (string) (len=17) "PayInvoiceRequest": (*main.Message)(0xc0004612c0)({ + fullName: (string) (len=17) "PayInvoiceRequest", + name: (string) (len=17) "PayInvoiceRequest", + fields: ([]*main.Field) (len=2 cap=2) { + (*main.Field)(0xc0001dbc80)({ + name: (string) (len=7) "invoice", + kind: (string) (len=6) "string", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc0005660c0)({ - name: (string) (len=11) "minSendable", + (*main.Field)(0xc0001dbcb0)({ + name: (string) (len=6) "amount", kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false - }), - (*main.Field)(0xc0005660f0)({ - name: (string) (len=8) "metadata", + }) + } + }), + (string) (len=25) "LnurlWithdrawInfoResponse": (*main.Message)(0xc000461480)({ + fullName: (string) (len=25) "LnurlWithdrawInfoResponse", + name: (string) (len=25) "LnurlWithdrawInfoResponse", + fields: ([]*main.Field) (len=8 cap=8) { + (*main.Field)(0xc0001dbf20)({ + name: (string) (len=3) "tag", kind: (string) (len=6) "string", isMap: (bool) false, isArray: (bool) false, @@ -2944,32 +2911,26 @@ isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc000566120)({ - name: (string) (len=11) "allowsNostr", - kind: (string) (len=4) "bool", + (*main.Field)(0xc0001dbf50)({ + name: (string) (len=8) "callback", + kind: (string) (len=6) "string", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc000566150)({ - name: (string) (len=11) "nostrPubkey", + (*main.Field)(0xc0001dbf80)({ + name: (string) (len=2) "k1", kind: (string) (len=6) "string", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false - }) - } - }), - (string) (len=17) "AddProductRequest": (*main.Message)(0xc000079b40)({ - fullName: (string) (len=17) "AddProductRequest", - name: (string) (len=17) "AddProductRequest", - fields: ([]*main.Field) (len=2 cap=2) { - (*main.Field)(0xc000566840)({ - name: (string) (len=4) "name", + }), + (*main.Field)(0xc0001dbfb0)({ + name: (string) (len=18) "defaultDescription", kind: (string) (len=6) "string", isMap: (bool) false, isArray: (bool) false, @@ -2977,47 +2938,26 @@ isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc000566870)({ - name: (string) (len=10) "price_sats", + (*main.Field)(0xc000348ff0)({ + name: (string) (len=15) "minWithdrawable", kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false - }) - } - }), - (string) (len=27) "LinkNPubThroughTokenRequest": (*main.Message)(0xc000079d80)({ - fullName: (string) (len=27) "LinkNPubThroughTokenRequest", - name: (string) (len=27) "LinkNPubThroughTokenRequest", - fields: ([]*main.Field) (len=2 cap=2) { - (*main.Field)(0xc000566ae0)({ - name: (string) (len=5) "token", - kind: (string) (len=6) "string", - isMap: (bool) false, - isArray: (bool) false, - isEnum: (bool) false, - isMessage: (bool) false, - isOptional: (bool) false }), - (*main.Field)(0xc000566b10)({ - name: (string) (len=9) "nostr_pub", - kind: (string) (len=6) "string", + (*main.Field)(0xc00007e000)({ + name: (string) (len=15) "maxWithdrawable", + kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false - }) - } - }), - (string) (len=25) "EncryptionExchangeRequest": (*main.Message)(0xc000078240)({ - fullName: (string) (len=25) "EncryptionExchangeRequest", - name: (string) (len=25) "EncryptionExchangeRequest", - fields: ([]*main.Field) (len=2 cap=2) { - (*main.Field)(0xc00053a180)({ - name: (string) (len=9) "publicKey", + }), + (*main.Field)(0xc00007f200)({ + name: (string) (len=12) "balanceCheck", kind: (string) (len=6) "string", isMap: (bool) false, isArray: (bool) false, @@ -3025,8 +2965,8 @@ isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc00053a1b0)({ - name: (string) (len=8) "deviceId", + (*main.Field)(0xc00007f230)({ + name: (string) (len=7) "payLink", kind: (string) (len=6) "string", isMap: (bool) false, isArray: (bool) false, @@ -3036,12 +2976,12 @@ }) } }), - (string) (len=17) "ChainBalanceEvent": (*main.Message)(0xc000078cc0)({ - fullName: (string) (len=17) "ChainBalanceEvent", - name: (string) (len=17) "ChainBalanceEvent", - fields: ([]*main.Field) (len=4 cap=4) { - (*main.Field)(0xc00053aab0)({ - name: (string) (len=12) "block_height", + (string) (len=11) "UsageMetric": (*main.Message)(0xc000460640)({ + fullName: (string) (len=11) "UsageMetric", + name: (string) (len=11) "UsageMetric", + fields: ([]*main.Field) (len=9 cap=16) { + (*main.Field)(0xc0003d2d50)({ + name: (string) (len=15) "processed_at_ms", kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, @@ -3049,8 +2989,8 @@ isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc00053aae0)({ - name: (string) (len=17) "confirmed_balance", + (*main.Field)(0xc0003d2d80)({ + name: (string) (len=14) "parsed_in_nano", kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, @@ -3058,8 +2998,8 @@ isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc00053ab10)({ - name: (string) (len=19) "unconfirmed_balance", + (*main.Field)(0xc0003d2db0)({ + name: (string) (len=12) "auth_in_nano", kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, @@ -3067,65 +3007,53 @@ isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc00053ab40)({ - name: (string) (len=13) "total_balance", + (*main.Field)(0xc0003d2de0)({ + name: (string) (len=16) "validate_in_nano", kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false - }) - } - }), - (string) (len=27) "SetMockInvoiceAsPaidRequest": (*main.Message)(0xc000078f40)({ - fullName: (string) (len=27) "SetMockInvoiceAsPaidRequest", - name: (string) (len=27) "SetMockInvoiceAsPaidRequest", - fields: ([]*main.Field) (len=2 cap=2) { - (*main.Field)(0xc00053b110)({ - name: (string) (len=7) "invoice", - kind: (string) (len=6) "string", + }), + (*main.Field)(0xc0003d2e10)({ + name: (string) (len=14) "handle_in_nano", + kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc00053b140)({ - name: (string) (len=6) "amount", - kind: (string) (len=5) "int64", + (*main.Field)(0xc0003d2e40)({ + name: (string) (len=8) "rpc_name", + kind: (string) (len=6) "string", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false - }) - } - }), - (string) (len=7) "AppUser": (*main.Message)(0xc0000791c0)({ - fullName: (string) (len=7) "AppUser", - name: (string) (len=7) "AppUser", - fields: ([]*main.Field) (len=3 cap=4) { - (*main.Field)(0xc00053b560)({ - name: (string) (len=10) "identifier", - kind: (string) (len=6) "string", + }), + (*main.Field)(0xc0003d2e70)({ + name: (string) (len=5) "batch", + kind: (string) (len=4) "bool", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc00053b590)({ - name: (string) (len=4) "info", - kind: (string) (len=8) "UserInfo", + (*main.Field)(0xc0003d2ea0)({ + name: (string) (len=5) "nostr", + kind: (string) (len=4) "bool", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, - isMessage: (bool) true, + isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc00053b5c0)({ - name: (string) (len=16) "max_withdrawable", + (*main.Field)(0xc0003d2ed0)({ + name: (string) (len=10) "batch_size", kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, @@ -3135,116 +3063,72 @@ }) } }), - (string) (len=24) "SetMockAppBalanceRequest": (*main.Message)(0xc000079400)({ - fullName: (string) (len=24) "SetMockAppBalanceRequest", - name: (string) (len=24) "SetMockAppBalanceRequest", - fields: ([]*main.Field) (len=1 cap=1) { - (*main.Field)(0xc00053b9b0)({ - name: (string) (len=6) "amount", + (string) (len=9) "UsersInfo": (*main.Message)(0xc000460740)({ + fullName: (string) (len=9) "UsersInfo", + name: (string) (len=9) "UsersInfo", + fields: ([]*main.Field) (len=6 cap=8) { + (*main.Field)(0xc0003d2fc0)({ + name: (string) (len=5) "total", kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false - }) - } - }), - (string) (len=21) "DecodeInvoiceResponse": (*main.Message)(0xc000079600)({ - fullName: (string) (len=21) "DecodeInvoiceResponse", - name: (string) (len=21) "DecodeInvoiceResponse", - fields: ([]*main.Field) (len=1 cap=1) { - (*main.Field)(0xc00053bc50)({ - name: (string) (len=6) "amount", + }), + (*main.Field)(0xc0003d2ff0)({ + name: (string) (len=10) "no_balance", kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false - }) - } - }), - (string) (len=25) "GetUserOperationsResponse": (*main.Message)(0xc000079b00)({ - fullName: (string) (len=25) "GetUserOperationsResponse", - name: (string) (len=25) "GetUserOperationsResponse", - fields: ([]*main.Field) (len=6 cap=8) { - (*main.Field)(0xc000566720)({ - name: (string) (len=31) "latestOutgoingInvoiceOperations", - kind: (string) (len=14) "UserOperations", - isMap: (bool) false, - isArray: (bool) false, - isEnum: (bool) false, - isMessage: (bool) true, - isOptional: (bool) false }), - (*main.Field)(0xc000566750)({ - name: (string) (len=31) "latestIncomingInvoiceOperations", - kind: (string) (len=14) "UserOperations", - isMap: (bool) false, - isArray: (bool) false, - isEnum: (bool) false, - isMessage: (bool) true, - isOptional: (bool) false - }), - (*main.Field)(0xc000566780)({ - name: (string) (len=26) "latestOutgoingTxOperations", - kind: (string) (len=14) "UserOperations", + (*main.Field)(0xc0003d3020)({ + name: (string) (len=16) "negative_balance", + kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, - isMessage: (bool) true, + isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc0005667b0)({ - name: (string) (len=26) "latestIncomingTxOperations", - kind: (string) (len=14) "UserOperations", + (*main.Field)(0xc0003d3050)({ + name: (string) (len=20) "always_been_inactive", + kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, - isMessage: (bool) true, + isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc0005667e0)({ - name: (string) (len=32) "latestOutgoingUserToUserPayemnts", - kind: (string) (len=14) "UserOperations", + (*main.Field)(0xc0003d3080)({ + name: (string) (len=11) "balance_avg", + kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, - isMessage: (bool) true, + isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc000566810)({ - name: (string) (len=32) "latestIncomingUserToUserPayemnts", - kind: (string) (len=14) "UserOperations", + (*main.Field)(0xc0003d30b0)({ + name: (string) (len=14) "balance_median", + kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, - isMessage: (bool) true, + isMessage: (bool) false, isOptional: (bool) false }) } }), - (string) (len=5) "Empty": (*main.Message)(0xc0000781c0)({ - fullName: (string) (len=5) "Empty", - name: (string) (len=5) "Empty", - fields: ([]*main.Field) - }), - (string) (len=18) "OpenChannelRequest": (*main.Message)(0xc000079700)({ - fullName: (string) (len=18) "OpenChannelRequest", - name: (string) (len=18) "OpenChannelRequest", - fields: ([]*main.Field) (len=4 cap=4) { - (*main.Field)(0xc00053be00)({ - name: (string) (len=11) "destination", - kind: (string) (len=6) "string", - isMap: (bool) false, - isArray: (bool) false, - isEnum: (bool) false, - isMessage: (bool) false, - isOptional: (bool) false - }), - (*main.Field)(0xc00053be30)({ - name: (string) (len=13) "fundingAmount", + (string) (len=14) "UserOperations": (*main.Message)(0xc000461700)({ + fullName: (string) (len=14) "UserOperations", + name: (string) (len=14) "UserOperations", + fields: ([]*main.Field) (len=3 cap=4) { + (*main.Field)(0xc0000b6660)({ + name: (string) (len=9) "fromIndex", kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, @@ -3252,8 +3136,8 @@ isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc00053be60)({ - name: (string) (len=10) "pushAmount", + (*main.Field)(0xc0000b6690)({ + name: (string) (len=7) "toIndex", kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, @@ -3261,22 +3145,22 @@ isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc00053be90)({ - name: (string) (len=12) "closeAddress", - kind: (string) (len=6) "string", + (*main.Field)(0xc0000b66c0)({ + name: (string) (len=10) "operations", + kind: (string) (len=13) "UserOperation", isMap: (bool) false, - isArray: (bool) false, + isArray: (bool) true, isEnum: (bool) false, - isMessage: (bool) false, + isMessage: (bool) true, isOptional: (bool) false }) } }), - (string) (len=30) "RequestNPubLinkingTokenRequest": (*main.Message)(0xc000079d00)({ + (string) (len=30) "RequestNPubLinkingTokenRequest": (*main.Message)(0xc000461980)({ fullName: (string) (len=30) "RequestNPubLinkingTokenRequest", name: (string) (len=30) "RequestNPubLinkingTokenRequest", fields: ([]*main.Field) (len=1 cap=1) { - (*main.Field)(0xc000566a80)({ + (*main.Field)(0xc0000b6a20)({ name: (string) (len=15) "user_identifier", kind: (string) (len=6) "string", isMap: (bool) false, @@ -3287,22 +3171,22 @@ }) } }), - (string) (len=7) "AuthApp": (*main.Message)(0xc000079140)({ - fullName: (string) (len=7) "AuthApp", - name: (string) (len=7) "AuthApp", + (string) (len=30) "SendAppUserToAppPaymentRequest": (*main.Message)(0xc000460fc0)({ + fullName: (string) (len=30) "SendAppUserToAppPaymentRequest", + name: (string) (len=30) "SendAppUserToAppPaymentRequest", fields: ([]*main.Field) (len=2 cap=2) { - (*main.Field)(0xc00053b470)({ - name: (string) (len=3) "app", - kind: (string) (len=11) "Application", + (*main.Field)(0xc0001db890)({ + name: (string) (len=20) "from_user_identifier", + kind: (string) (len=6) "string", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, - isMessage: (bool) true, + isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc00053b4a0)({ - name: (string) (len=10) "auth_token", - kind: (string) (len=6) "string", + (*main.Field)(0xc0001db8c0)({ + name: (string) (len=6) "amount", + kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, @@ -3311,63 +3195,48 @@ }) } }), - (string) (len=11) "Application": (*main.Message)(0xc000079100)({ - fullName: (string) (len=11) "Application", - name: (string) (len=11) "Application", - fields: ([]*main.Field) (len=4 cap=4) { - (*main.Field)(0xc00053b3b0)({ - name: (string) (len=4) "name", - kind: (string) (len=6) "string", + (string) (len=13) "UserOperation": (*main.Message)(0xc0004616c0)({ + fullName: (string) (len=13) "UserOperation", + name: (string) (len=13) "UserOperation", + fields: ([]*main.Field) (len=11 cap=16) { + (*main.Field)(0xc0000b6450)({ + name: (string) (len=10) "paidAtUnix", + kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc00053b3e0)({ - name: (string) (len=2) "id", - kind: (string) (len=6) "string", + (*main.Field)(0xc0000b6480)({ + name: (string) (len=4) "type", + kind: (string) (len=17) "UserOperationType", isMap: (bool) false, isArray: (bool) false, - isEnum: (bool) false, + isEnum: (bool) true, isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc00053b410)({ - name: (string) (len=7) "balance", - kind: (string) (len=5) "int64", + (*main.Field)(0xc0000b64b0)({ + name: (string) (len=7) "inbound", + kind: (string) (len=4) "bool", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc00053b440)({ - name: (string) (len=4) "npub", - kind: (string) (len=6) "string", - isMap: (bool) false, - isArray: (bool) false, - isEnum: (bool) false, - isMessage: (bool) false, - isOptional: (bool) false - }) - } - }), - (string) (len=20) "AddAppInvoiceRequest": (*main.Message)(0xc000079200)({ - fullName: (string) (len=20) "AddAppInvoiceRequest", - name: (string) (len=20) "AddAppInvoiceRequest", - fields: ([]*main.Field) (len=3 cap=4) { - (*main.Field)(0xc00053b5f0)({ - name: (string) (len=16) "payer_identifier", - kind: (string) (len=6) "string", + (*main.Field)(0xc0000b64e0)({ + name: (string) (len=6) "amount", + kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc00053b620)({ - name: (string) (len=17) "http_callback_url", + (*main.Field)(0xc0000b6510)({ + name: (string) (len=10) "identifier", kind: (string) (len=6) "string", isMap: (bool) false, isArray: (bool) false, @@ -3375,23 +3244,8 @@ isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc00053b650)({ - name: (string) (len=11) "invoice_req", - kind: (string) (len=17) "NewInvoiceRequest", - isMap: (bool) false, - isArray: (bool) false, - isEnum: (bool) false, - isMessage: (bool) true, - isOptional: (bool) false - }) - } - }), - (string) (len=17) "LnurlLinkResponse": (*main.Message)(0xc000079780)({ - fullName: (string) (len=17) "LnurlLinkResponse", - name: (string) (len=17) "LnurlLinkResponse", - fields: ([]*main.Field) (len=2 cap=2) { - (*main.Field)(0xc00053bef0)({ - name: (string) (len=5) "lnurl", + (*main.Field)(0xc0000b6540)({ + name: (string) (len=11) "operationId", kind: (string) (len=6) "string", isMap: (bool) false, isArray: (bool) false, @@ -3399,41 +3253,35 @@ isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc00053bf20)({ - name: (string) (len=2) "k1", - kind: (string) (len=6) "string", + (*main.Field)(0xc0000b6570)({ + name: (string) (len=11) "service_fee", + kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false - }) - } - }), - (string) (len=13) "BannedAppUser": (*main.Message)(0xc000079000)({ - fullName: (string) (len=13) "BannedAppUser", - name: (string) (len=13) "BannedAppUser", - fields: ([]*main.Field) (len=4 cap=4) { - (*main.Field)(0xc00053b1d0)({ - name: (string) (len=8) "app_name", - kind: (string) (len=6) "string", + }), + (*main.Field)(0xc0000b65a0)({ + name: (string) (len=11) "network_fee", + kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc00053b200)({ - name: (string) (len=6) "app_id", - kind: (string) (len=6) "string", + (*main.Field)(0xc0000b65d0)({ + name: (string) (len=9) "confirmed", + kind: (string) (len=4) "bool", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc00053b230)({ - name: (string) (len=15) "user_identifier", + (*main.Field)(0xc0000b6600)({ + name: (string) (len=7) "tx_hash", kind: (string) (len=6) "string", isMap: (bool) false, isArray: (bool) false, @@ -3441,9 +3289,9 @@ isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc00053b260)({ - name: (string) (len=9) "nostr_pub", - kind: (string) (len=6) "string", + (*main.Field)(0xc0000b6630)({ + name: (string) (len=8) "internal", + kind: (string) (len=4) "bool", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, @@ -3452,99 +3300,69 @@ }) } }), - (string) (len=10) "AppMetrics": (*main.Message)(0xc000078b40)({ - fullName: (string) (len=10) "AppMetrics", - name: (string) (len=10) "AppMetrics", - fields: ([]*main.Field) (len=9 cap=16) { - (*main.Field)(0xc00053a570)({ - name: (string) (len=3) "app", - kind: (string) (len=11) "Application", - isMap: (bool) false, - isArray: (bool) false, - isEnum: (bool) false, - isMessage: (bool) true, - isOptional: (bool) false - }), - (*main.Field)(0xc00053a5a0)({ - name: (string) (len=5) "users", - kind: (string) (len=9) "UsersInfo", - isMap: (bool) false, - isArray: (bool) false, - isEnum: (bool) false, - isMessage: (bool) true, - isOptional: (bool) false - }), - (*main.Field)(0xc00053a5d0)({ - name: (string) (len=8) "received", - kind: (string) (len=5) "int64", - isMap: (bool) false, - isArray: (bool) false, - isEnum: (bool) false, - isMessage: (bool) false, - isOptional: (bool) false - }), - (*main.Field)(0xc00053a600)({ - name: (string) (len=5) "spent", - kind: (string) (len=5) "int64", + (string) (len=7) "Product": (*main.Message)(0xc000461800)({ + fullName: (string) (len=7) "Product", + name: (string) (len=7) "Product", + fields: ([]*main.Field) (len=3 cap=4) { + (*main.Field)(0xc0000b6870)({ + name: (string) (len=2) "id", + kind: (string) (len=6) "string", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc00053a630)({ - name: (string) (len=9) "available", - kind: (string) (len=5) "int64", + (*main.Field)(0xc0000b68a0)({ + name: (string) (len=4) "name", + kind: (string) (len=6) "string", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc00053a660)({ - name: (string) (len=4) "fees", + (*main.Field)(0xc0000b68d0)({ + name: (string) (len=10) "price_sats", kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false - }), - (*main.Field)(0xc00053a690)({ - name: (string) (len=8) "invoices", - kind: (string) (len=5) "int64", + }) + } + }), + (string) (len=27) "LinkNPubThroughTokenRequest": (*main.Message)(0xc000461a00)({ + fullName: (string) (len=27) "LinkNPubThroughTokenRequest", + name: (string) (len=27) "LinkNPubThroughTokenRequest", + fields: ([]*main.Field) (len=2 cap=2) { + (*main.Field)(0xc0000b6a80)({ + name: (string) (len=5) "token", + kind: (string) (len=6) "string", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc00053a6c0)({ - name: (string) (len=10) "total_fees", - kind: (string) (len=5) "int64", + (*main.Field)(0xc0000b6ab0)({ + name: (string) (len=9) "nostr_pub", + kind: (string) (len=6) "string", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false - }), - (*main.Field)(0xc00053a6f0)({ - name: (string) (len=10) "operations", - kind: (string) (len=13) "UserOperation", - isMap: (bool) false, - isArray: (bool) true, - isEnum: (bool) false, - isMessage: (bool) true, - isOptional: (bool) false }) } }), - (string) (len=28) "SetMockAppUserBalanceRequest": (*main.Message)(0xc0000793c0)({ - fullName: (string) (len=28) "SetMockAppUserBalanceRequest", - name: (string) (len=28) "SetMockAppUserBalanceRequest", + (string) (len=25) "EncryptionExchangeRequest": (*main.Message)(0xc0004605c0)({ + fullName: (string) (len=25) "EncryptionExchangeRequest", + name: (string) (len=25) "EncryptionExchangeRequest", fields: ([]*main.Field) (len=2 cap=2) { - (*main.Field)(0xc00053b950)({ - name: (string) (len=15) "user_identifier", + (*main.Field)(0xc0003d2cf0)({ + name: (string) (len=9) "publicKey", kind: (string) (len=6) "string", isMap: (bool) false, isArray: (bool) false, @@ -3552,9 +3370,9 @@ isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc00053b980)({ - name: (string) (len=6) "amount", - kind: (string) (len=5) "int64", + (*main.Field)(0xc0003d2d20)({ + name: (string) (len=8) "deviceId", + kind: (string) (len=6) "string", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, @@ -3563,12 +3381,12 @@ }) } }), - (string) (len=17) "PayAddressRequest": (*main.Message)(0xc0000794c0)({ - fullName: (string) (len=17) "PayAddressRequest", - name: (string) (len=17) "PayAddressRequest", + (string) (len=24) "PayAppUserInvoiceRequest": (*main.Message)(0xc000460f40)({ + fullName: (string) (len=24) "PayAppUserInvoiceRequest", + name: (string) (len=24) "PayAppUserInvoiceRequest", fields: ([]*main.Field) (len=3 cap=4) { - (*main.Field)(0xc00053ba40)({ - name: (string) (len=7) "address", + (*main.Field)(0xc0001db770)({ + name: (string) (len=15) "user_identifier", kind: (string) (len=6) "string", isMap: (bool) false, isArray: (bool) false, @@ -3576,17 +3394,17 @@ isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc00053ba70)({ - name: (string) (len=9) "amoutSats", - kind: (string) (len=5) "int64", + (*main.Field)(0xc0001db7a0)({ + name: (string) (len=7) "invoice", + kind: (string) (len=6) "string", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc00053baa0)({ - name: (string) (len=12) "satsPerVByte", + (*main.Field)(0xc0001db7d0)({ + name: (string) (len=6) "amount", kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, @@ -3596,60 +3414,78 @@ }) } }), - (string) (len=14) "UserOperations": (*main.Message)(0xc000079a80)({ - fullName: (string) (len=14) "UserOperations", - name: (string) (len=14) "UserOperations", + (string) (len=15) "MigrationUpdate": (*main.Message)(0xc0004618c0)({ + fullName: (string) (len=15) "MigrationUpdate", + name: (string) (len=15) "MigrationUpdate", + fields: ([]*main.Field) (len=2 cap=2) { + (*main.Field)(0xc0000b6960)({ + name: (string) (len=7) "closure", + kind: (string) (len=16) "ClosureMigration", + isMap: (bool) false, + isArray: (bool) false, + isEnum: (bool) false, + isMessage: (bool) true, + isOptional: (bool) true + }), + (*main.Field)(0xc0000b6990)({ + name: (string) (len=6) "relays", + kind: (string) (len=15) "RelaysMigration", + isMap: (bool) false, + isArray: (bool) false, + isEnum: (bool) false, + isMessage: (bool) true, + isOptional: (bool) true + }) + } + }), + (string) (len=34) "SendAppUserToAppUserPaymentRequest": (*main.Message)(0xc000460f80)({ + fullName: (string) (len=34) "SendAppUserToAppUserPaymentRequest", + name: (string) (len=34) "SendAppUserToAppUserPaymentRequest", fields: ([]*main.Field) (len=3 cap=4) { - (*main.Field)(0xc000566690)({ - name: (string) (len=9) "fromIndex", - kind: (string) (len=5) "int64", + (*main.Field)(0xc0001db800)({ + name: (string) (len=20) "from_user_identifier", + kind: (string) (len=6) "string", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc0005666c0)({ - name: (string) (len=7) "toIndex", - kind: (string) (len=5) "int64", + (*main.Field)(0xc0001db830)({ + name: (string) (len=18) "to_user_identifier", + kind: (string) (len=6) "string", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc0005666f0)({ - name: (string) (len=10) "operations", - kind: (string) (len=13) "UserOperation", + (*main.Field)(0xc0001db860)({ + name: (string) (len=6) "amount", + kind: (string) (len=5) "int64", isMap: (bool) false, - isArray: (bool) true, + isArray: (bool) false, isEnum: (bool) false, - isMessage: (bool) true, + isMessage: (bool) false, isOptional: (bool) false }) } }), - (string) (len=12) "UsageMetrics": (*main.Message)(0xc000078380)({ - fullName: (string) (len=12) "UsageMetrics", - name: (string) (len=12) "UsageMetrics", - fields: ([]*main.Field) (len=1 cap=1) { - (*main.Field)(0xc00053a390)({ - name: (string) (len=7) "metrics", - kind: (string) (len=11) "UsageMetric", + (string) (len=17) "NewInvoiceRequest": (*main.Message)(0xc0004611c0)({ + fullName: (string) (len=17) "NewInvoiceRequest", + name: (string) (len=17) "NewInvoiceRequest", + fields: ([]*main.Field) (len=2 cap=2) { + (*main.Field)(0xc0001dbb90)({ + name: (string) (len=10) "amountSats", + kind: (string) (len=5) "int64", isMap: (bool) false, - isArray: (bool) true, + isArray: (bool) false, isEnum: (bool) false, - isMessage: (bool) true, + isMessage: (bool) false, isOptional: (bool) false - }) - } - }), - (string) (len=18) "LndGetInfoResponse": (*main.Message)(0xc000078f80)({ - fullName: (string) (len=18) "LndGetInfoResponse", - name: (string) (len=18) "LndGetInfoResponse", - fields: ([]*main.Field) (len=1 cap=1) { - (*main.Field)(0xc00053b170)({ - name: (string) (len=5) "alias", + }), + (*main.Field)(0xc0001dbbc0)({ + name: (string) (len=4) "memo", kind: (string) (len=6) "string", isMap: (bool) false, isArray: (bool) false, @@ -3659,12 +3495,12 @@ }) } }), - (string) (len=17) "PayInvoiceRequest": (*main.Message)(0xc000079640)({ - fullName: (string) (len=17) "PayInvoiceRequest", - name: (string) (len=17) "PayInvoiceRequest", - fields: ([]*main.Field) (len=2 cap=2) { - (*main.Field)(0xc00053bc80)({ - name: (string) (len=7) "invoice", + (string) (len=8) "UserInfo": (*main.Message)(0xc0004615c0)({ + fullName: (string) (len=8) "UserInfo", + name: (string) (len=8) "UserInfo", + fields: ([]*main.Field) (len=7 cap=8) { + (*main.Field)(0xc0000b61b0)({ + name: (string) (len=6) "userId", kind: (string) (len=6) "string", isMap: (bool) false, isArray: (bool) false, @@ -3672,47 +3508,35 @@ isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc00053bcb0)({ - name: (string) (len=6) "amount", + (*main.Field)(0xc0000b61e0)({ + name: (string) (len=7) "balance", kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false - }) - } - }), - (string) (len=15) "RelaysMigration": (*main.Message)(0xc000079cc0)({ - fullName: (string) (len=15) "RelaysMigration", - name: (string) (len=15) "RelaysMigration", - fields: ([]*main.Field) (len=1 cap=1) { - (*main.Field)(0xc000566a50)({ - name: (string) (len=6) "relays", - kind: (string) (len=6) "string", + }), + (*main.Field)(0xc0000b6210)({ + name: (string) (len=16) "max_withdrawable", + kind: (string) (len=5) "int64", isMap: (bool) false, - isArray: (bool) true, + isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false - }) - } - }), - (string) (len=12) "RoutingEvent": (*main.Message)(0xc000078c40)({ - fullName: (string) (len=12) "RoutingEvent", - name: (string) (len=12) "RoutingEvent", - fields: ([]*main.Field) (len=12 cap=16) { - (*main.Field)(0xc00053a7b0)({ - name: (string) (len=19) "incoming_channel_id", - kind: (string) (len=5) "int64", + }), + (*main.Field)(0xc0000b6240)({ + name: (string) (len=15) "user_identifier", + kind: (string) (len=6) "string", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc00053a7e0)({ - name: (string) (len=16) "incoming_htlc_id", + (*main.Field)(0xc0000b6270)({ + name: (string) (len=15) "service_fee_bps", kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, @@ -3720,8 +3544,8 @@ isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc00053a810)({ - name: (string) (len=19) "outgoing_channel_id", + (*main.Field)(0xc0000b62a0)({ + name: (string) (len=19) "network_max_fee_bps", kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, @@ -3729,26 +3553,83 @@ isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc00053a840)({ - name: (string) (len=16) "outgoing_htlc_id", + (*main.Field)(0xc0000b62d0)({ + name: (string) (len=21) "network_max_fee_fixed", kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false + }) + } + }), + (string) (len=25) "GetUserOperationsResponse": (*main.Message)(0xc000461780)({ + fullName: (string) (len=25) "GetUserOperationsResponse", + name: (string) (len=25) "GetUserOperationsResponse", + fields: ([]*main.Field) (len=6 cap=8) { + (*main.Field)(0xc0000b66f0)({ + name: (string) (len=31) "latestOutgoingInvoiceOperations", + kind: (string) (len=14) "UserOperations", + isMap: (bool) false, + isArray: (bool) false, + isEnum: (bool) false, + isMessage: (bool) true, + isOptional: (bool) false }), - (*main.Field)(0xc00053a870)({ - name: (string) (len=12) "timestamp_ns", - kind: (string) (len=5) "int64", + (*main.Field)(0xc0000b6720)({ + name: (string) (len=31) "latestIncomingInvoiceOperations", + kind: (string) (len=14) "UserOperations", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, - isMessage: (bool) false, + isMessage: (bool) true, isOptional: (bool) false }), - (*main.Field)(0xc00053a8a0)({ - name: (string) (len=10) "event_type", + (*main.Field)(0xc0000b6750)({ + name: (string) (len=26) "latestOutgoingTxOperations", + kind: (string) (len=14) "UserOperations", + isMap: (bool) false, + isArray: (bool) false, + isEnum: (bool) false, + isMessage: (bool) true, + isOptional: (bool) false + }), + (*main.Field)(0xc0000b6780)({ + name: (string) (len=26) "latestIncomingTxOperations", + kind: (string) (len=14) "UserOperations", + isMap: (bool) false, + isArray: (bool) false, + isEnum: (bool) false, + isMessage: (bool) true, + isOptional: (bool) false + }), + (*main.Field)(0xc0000b67b0)({ + name: (string) (len=32) "latestOutgoingUserToUserPayemnts", + kind: (string) (len=14) "UserOperations", + isMap: (bool) false, + isArray: (bool) false, + isEnum: (bool) false, + isMessage: (bool) true, + isOptional: (bool) false + }), + (*main.Field)(0xc0000b67e0)({ + name: (string) (len=32) "latestIncomingUserToUserPayemnts", + kind: (string) (len=14) "UserOperations", + isMap: (bool) false, + isArray: (bool) false, + isEnum: (bool) false, + isMessage: (bool) true, + isOptional: (bool) false + }) + } + }), + (string) (len=24) "AddAppUserInvoiceRequest": (*main.Message)(0xc000460ec0)({ + fullName: (string) (len=24) "AddAppUserInvoiceRequest", + name: (string) (len=24) "AddAppUserInvoiceRequest", + fields: ([]*main.Field) (len=4 cap=4) { + (*main.Field)(0xc0001db680)({ + name: (string) (len=19) "receiver_identifier", kind: (string) (len=6) "string", isMap: (bool) false, isArray: (bool) false, @@ -3756,54 +3637,90 @@ isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc00053a8d0)({ - name: (string) (len=17) "incoming_amt_msat", - kind: (string) (len=5) "int64", + (*main.Field)(0xc0001db6b0)({ + name: (string) (len=16) "payer_identifier", + kind: (string) (len=6) "string", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc00053a900)({ - name: (string) (len=17) "outgoing_amt_msat", - kind: (string) (len=5) "int64", + (*main.Field)(0xc0001db6e0)({ + name: (string) (len=17) "http_callback_url", + kind: (string) (len=6) "string", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc00053a930)({ - name: (string) (len=14) "failure_string", + (*main.Field)(0xc0001db710)({ + name: (string) (len=11) "invoice_req", + kind: (string) (len=17) "NewInvoiceRequest", + isMap: (bool) false, + isArray: (bool) false, + isEnum: (bool) false, + isMessage: (bool) true, + isOptional: (bool) false + }) + } + }), + (string) (len=20) "DecodeInvoiceRequest": (*main.Message)(0xc000461240)({ + fullName: (string) (len=20) "DecodeInvoiceRequest", + name: (string) (len=20) "DecodeInvoiceRequest", + fields: ([]*main.Field) (len=1 cap=1) { + (*main.Field)(0xc0001dbc20)({ + name: (string) (len=7) "invoice", kind: (string) (len=6) "string", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false - }), - (*main.Field)(0xc00053a960)({ - name: (string) (len=7) "settled", - kind: (string) (len=4) "bool", + }) + } + }), + (string) (len=20) "AddAppInvoiceRequest": (*main.Message)(0xc000460e80)({ + fullName: (string) (len=20) "AddAppInvoiceRequest", + name: (string) (len=20) "AddAppInvoiceRequest", + fields: ([]*main.Field) (len=3 cap=4) { + (*main.Field)(0xc0001db5f0)({ + name: (string) (len=16) "payer_identifier", + kind: (string) (len=6) "string", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc00053a990)({ - name: (string) (len=8) "offchain", - kind: (string) (len=4) "bool", + (*main.Field)(0xc0001db620)({ + name: (string) (len=17) "http_callback_url", + kind: (string) (len=6) "string", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc00053a9c0)({ - name: (string) (len=18) "forward_fail_event", - kind: (string) (len=4) "bool", + (*main.Field)(0xc0001db650)({ + name: (string) (len=11) "invoice_req", + kind: (string) (len=17) "NewInvoiceRequest", + isMap: (bool) false, + isArray: (bool) false, + isEnum: (bool) false, + isMessage: (bool) true, + isOptional: (bool) false + }) + } + }), + (string) (len=21) "DecodeInvoiceResponse": (*main.Message)(0xc000461280)({ + fullName: (string) (len=21) "DecodeInvoiceResponse", + name: (string) (len=21) "DecodeInvoiceResponse", + fields: ([]*main.Field) (len=1 cap=1) { + (*main.Field)(0xc0001dbc50)({ + name: (string) (len=6) "amount", + kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, @@ -3812,12 +3729,12 @@ }) } }), - (string) (len=18) "NewInvoiceResponse": (*main.Message)(0xc000079580)({ - fullName: (string) (len=18) "NewInvoiceResponse", - name: (string) (len=18) "NewInvoiceResponse", + (string) (len=19) "OpenChannelResponse": (*main.Message)(0xc0004613c0)({ + fullName: (string) (len=19) "OpenChannelResponse", + name: (string) (len=19) "OpenChannelResponse", fields: ([]*main.Field) (len=1 cap=1) { - (*main.Field)(0xc00053bbf0)({ - name: (string) (len=7) "invoice", + (*main.Field)(0xc0001dbe90)({ + name: (string) (len=9) "channelId", kind: (string) (len=6) "string", isMap: (bool) false, isArray: (bool) false, @@ -3827,12 +3744,51 @@ }) } }), - (string) (len=20) "DecodeInvoiceRequest": (*main.Message)(0xc0000795c0)({ - fullName: (string) (len=20) "DecodeInvoiceRequest", - name: (string) (len=20) "DecodeInvoiceRequest", + (string) (len=17) "LiveUserOperation": (*main.Message)(0xc000461880)({ + fullName: (string) (len=17) "LiveUserOperation", + name: (string) (len=17) "LiveUserOperation", fields: ([]*main.Field) (len=1 cap=1) { - (*main.Field)(0xc00053bc20)({ - name: (string) (len=7) "invoice", + (*main.Field)(0xc0000b6930)({ + name: (string) (len=9) "operation", + kind: (string) (len=13) "UserOperation", + isMap: (bool) false, + isArray: (bool) false, + isEnum: (bool) false, + isMessage: (bool) true, + isOptional: (bool) false + }) + } + }), + (string) (len=12) "UsageMetrics": (*main.Message)(0xc000460680)({ + fullName: (string) (len=12) "UsageMetrics", + name: (string) (len=12) "UsageMetrics", + fields: ([]*main.Field) (len=1 cap=1) { + (*main.Field)(0xc0003d2f00)({ + name: (string) (len=7) "metrics", + kind: (string) (len=11) "UsageMetric", + isMap: (bool) false, + isArray: (bool) true, + isEnum: (bool) false, + isMessage: (bool) true, + isOptional: (bool) false + }) + } + }), + (string) (len=7) "AuthApp": (*main.Message)(0xc000460dc0)({ + fullName: (string) (len=7) "AuthApp", + name: (string) (len=7) "AuthApp", + fields: ([]*main.Field) (len=2 cap=2) { + (*main.Field)(0xc0001db470)({ + name: (string) (len=3) "app", + kind: (string) (len=11) "Application", + isMap: (bool) false, + isArray: (bool) false, + isEnum: (bool) false, + isMessage: (bool) true, + isOptional: (bool) false + }), + (*main.Field)(0xc0001db4a0)({ + name: (string) (len=10) "auth_token", kind: (string) (len=6) "string", isMap: (bool) false, isArray: (bool) false, @@ -3842,30 +3798,56 @@ }) } }), - (string) (len=9) "UsersInfo": (*main.Message)(0xc000078ac0)({ - fullName: (string) (len=9) "UsersInfo", - name: (string) (len=9) "UsersInfo", - fields: ([]*main.Field) (len=6 cap=8) { - (*main.Field)(0xc00053a450)({ - name: (string) (len=5) "total", - kind: (string) (len=5) "int64", + (string) (len=17) "GetAppUserRequest": (*main.Message)(0xc000460f00)({ + fullName: (string) (len=17) "GetAppUserRequest", + name: (string) (len=17) "GetAppUserRequest", + fields: ([]*main.Field) (len=1 cap=1) { + (*main.Field)(0xc0001db740)({ + name: (string) (len=15) "user_identifier", + kind: (string) (len=6) "string", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false - }), - (*main.Field)(0xc00053a480)({ - name: (string) (len=10) "no_balance", - kind: (string) (len=5) "int64", + }) + } + }), + (string) (len=22) "HandleLnurlPayResponse": (*main.Message)(0xc000461540)({ + fullName: (string) (len=22) "HandleLnurlPayResponse", + name: (string) (len=22) "HandleLnurlPayResponse", + fields: ([]*main.Field) (len=2 cap=2) { + (*main.Field)(0xc0000b6150)({ + name: (string) (len=2) "pr", + kind: (string) (len=6) "string", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc00053a4b0)({ - name: (string) (len=16) "negative_balance", + (*main.Field)(0xc0000b6180)({ + name: (string) (len=6) "routes", + kind: (string) (len=5) "Empty", + isMap: (bool) false, + isArray: (bool) true, + isEnum: (bool) false, + isMessage: (bool) true, + isOptional: (bool) false + }) + } + }), + (string) (len=5) "Empty": (*main.Message)(0xc000460580)({ + fullName: (string) (len=5) "Empty", + name: (string) (len=5) "Empty", + fields: ([]*main.Field) + }), + (string) (len=19) "ChannelBalanceEvent": (*main.Message)(0xc000460900)({ + fullName: (string) (len=19) "ChannelBalanceEvent", + name: (string) (len=19) "ChannelBalanceEvent", + fields: ([]*main.Field) (len=4 cap=4) { + (*main.Field)(0xc0003d3560)({ + name: (string) (len=12) "block_height", kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, @@ -3873,17 +3855,17 @@ isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc00053a4e0)({ - name: (string) (len=20) "always_been_inactive", - kind: (string) (len=5) "int64", + (*main.Field)(0xc0003d3590)({ + name: (string) (len=10) "channel_id", + kind: (string) (len=6) "string", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc00053a510)({ - name: (string) (len=11) "balance_avg", + (*main.Field)(0xc0003d35c0)({ + name: (string) (len=18) "local_balance_sats", kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, @@ -3891,8 +3873,8 @@ isMessage: (bool) false, isOptional: (bool) false }), - (*main.Field)(0xc00053a540)({ - name: (string) (len=14) "balance_median", + (*main.Field)(0xc0003d35f0)({ + name: (string) (len=19) "remote_balance_sats", kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, diff --git a/proto/autogenerated/ts/types.ts b/proto/autogenerated/ts/types.ts index c9585de3e..bb1ab5f8b 100644 --- a/proto/autogenerated/ts/types.ts +++ b/proto/autogenerated/ts/types.ts @@ -266,73 +266,71 @@ export type OptionsBaseMessage = { allOptionalsAreSet?: true } -export type MigrationUpdate = { - closure?: ClosureMigration - relays?: RelaysMigration +export type AddAppUserRequest = { + identifier: string + fail_if_exists: boolean + balance: number } -export type MigrationUpdateOptionalField = 'closure' | 'relays' -export const MigrationUpdateOptionalFields: MigrationUpdateOptionalField[] = ['closure', 'relays'] -export type MigrationUpdateOptions = OptionsBaseMessage & { - checkOptionalsAreSet?: MigrationUpdateOptionalField[] - closure_Options?: ClosureMigrationOptions - relays_Options?: RelaysMigrationOptions +export const AddAppUserRequestOptionalFields: [] = [] +export type AddAppUserRequestOptions = OptionsBaseMessage & { + checkOptionalsAreSet?: [] + identifier_CustomCheck?: (v: string) => boolean + fail_if_exists_CustomCheck?: (v: boolean) => boolean + balance_CustomCheck?: (v: number) => boolean } -export const MigrationUpdateValidate = (o?: MigrationUpdate, opts: MigrationUpdateOptions = {}, path: string = 'MigrationUpdate::root.'): Error | null => { +export const AddAppUserRequestValidate = (o?: AddAppUserRequest, opts: AddAppUserRequestOptions = {}, path: string = 'AddAppUserRequest::root.'): Error | null => { if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message') if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null') - if (typeof o.closure === 'object' || opts.allOptionalsAreSet || opts.checkOptionalsAreSet?.includes('closure')) { - const closureErr = ClosureMigrationValidate(o.closure, opts.closure_Options, `${path}.closure`) - if (closureErr !== null) return closureErr - } - + if (typeof o.identifier !== 'string') return new Error(`${path}.identifier: is not a string`) + if (opts.identifier_CustomCheck && !opts.identifier_CustomCheck(o.identifier)) return new Error(`${path}.identifier: custom check failed`) - if (typeof o.relays === 'object' || opts.allOptionalsAreSet || opts.checkOptionalsAreSet?.includes('relays')) { - const relaysErr = RelaysMigrationValidate(o.relays, opts.relays_Options, `${path}.relays`) - if (relaysErr !== null) return relaysErr - } - + if (typeof o.fail_if_exists !== 'boolean') return new Error(`${path}.fail_if_exists: is not a boolean`) + if (opts.fail_if_exists_CustomCheck && !opts.fail_if_exists_CustomCheck(o.fail_if_exists)) return new Error(`${path}.fail_if_exists: custom check failed`) + + if (typeof o.balance !== 'number') return new Error(`${path}.balance: is not a number`) + if (opts.balance_CustomCheck && !opts.balance_CustomCheck(o.balance)) return new Error(`${path}.balance: custom check failed`) return null } -export type RequestNPubLinkingTokenResponse = { - token: string +export type SetMockAppUserBalanceRequest = { + user_identifier: string + amount: number } -export const RequestNPubLinkingTokenResponseOptionalFields: [] = [] -export type RequestNPubLinkingTokenResponseOptions = OptionsBaseMessage & { +export const SetMockAppUserBalanceRequestOptionalFields: [] = [] +export type SetMockAppUserBalanceRequestOptions = OptionsBaseMessage & { checkOptionalsAreSet?: [] - token_CustomCheck?: (v: string) => boolean + user_identifier_CustomCheck?: (v: string) => boolean + amount_CustomCheck?: (v: number) => boolean } -export const RequestNPubLinkingTokenResponseValidate = (o?: RequestNPubLinkingTokenResponse, opts: RequestNPubLinkingTokenResponseOptions = {}, path: string = 'RequestNPubLinkingTokenResponse::root.'): Error | null => { +export const SetMockAppUserBalanceRequestValidate = (o?: SetMockAppUserBalanceRequest, opts: SetMockAppUserBalanceRequestOptions = {}, path: string = 'SetMockAppUserBalanceRequest::root.'): Error | null => { if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message') if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null') - if (typeof o.token !== 'string') return new Error(`${path}.token: is not a string`) - if (opts.token_CustomCheck && !opts.token_CustomCheck(o.token)) return new Error(`${path}.token: custom check failed`) + if (typeof o.user_identifier !== 'string') return new Error(`${path}.user_identifier: is not a string`) + if (opts.user_identifier_CustomCheck && !opts.user_identifier_CustomCheck(o.user_identifier)) return new Error(`${path}.user_identifier: custom check failed`) + + if (typeof o.amount !== 'number') return new Error(`${path}.amount: is not a number`) + if (opts.amount_CustomCheck && !opts.amount_CustomCheck(o.amount)) return new Error(`${path}.amount: custom check failed`) return null } -export type PayAppUserInvoiceRequest = { - user_identifier: string +export type PayInvoiceRequest = { invoice: string amount: number } -export const PayAppUserInvoiceRequestOptionalFields: [] = [] -export type PayAppUserInvoiceRequestOptions = OptionsBaseMessage & { +export const PayInvoiceRequestOptionalFields: [] = [] +export type PayInvoiceRequestOptions = OptionsBaseMessage & { checkOptionalsAreSet?: [] - user_identifier_CustomCheck?: (v: string) => boolean invoice_CustomCheck?: (v: string) => boolean amount_CustomCheck?: (v: number) => boolean } -export const PayAppUserInvoiceRequestValidate = (o?: PayAppUserInvoiceRequest, opts: PayAppUserInvoiceRequestOptions = {}, path: string = 'PayAppUserInvoiceRequest::root.'): Error | null => { +export const PayInvoiceRequestValidate = (o?: PayInvoiceRequest, opts: PayInvoiceRequestOptions = {}, path: string = 'PayInvoiceRequest::root.'): Error | null => { if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message') if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null') - if (typeof o.user_identifier !== 'string') return new Error(`${path}.user_identifier: is not a string`) - if (opts.user_identifier_CustomCheck && !opts.user_identifier_CustomCheck(o.user_identifier)) return new Error(`${path}.user_identifier: custom check failed`) - if (typeof o.invoice !== 'string') return new Error(`${path}.invoice: is not a string`) if (opts.invoice_CustomCheck && !opts.invoice_CustomCheck(o.invoice)) return new Error(`${path}.invoice: custom check failed`) @@ -342,134 +340,156 @@ export const PayAppUserInvoiceRequestValidate = (o?: PayAppUserInvoiceRequest, o return null } -export type NewAddressResponse = { - address: string +export type LnurlWithdrawInfoResponse = { + tag: string + callback: string + k1: string + defaultDescription: string + minWithdrawable: number + maxWithdrawable: number + balanceCheck: string + payLink: string } -export const NewAddressResponseOptionalFields: [] = [] -export type NewAddressResponseOptions = OptionsBaseMessage & { +export const LnurlWithdrawInfoResponseOptionalFields: [] = [] +export type LnurlWithdrawInfoResponseOptions = OptionsBaseMessage & { checkOptionalsAreSet?: [] - address_CustomCheck?: (v: string) => boolean + tag_CustomCheck?: (v: string) => boolean + callback_CustomCheck?: (v: string) => boolean + k1_CustomCheck?: (v: string) => boolean + defaultDescription_CustomCheck?: (v: string) => boolean + minWithdrawable_CustomCheck?: (v: number) => boolean + maxWithdrawable_CustomCheck?: (v: number) => boolean + balanceCheck_CustomCheck?: (v: string) => boolean + payLink_CustomCheck?: (v: string) => boolean } -export const NewAddressResponseValidate = (o?: NewAddressResponse, opts: NewAddressResponseOptions = {}, path: string = 'NewAddressResponse::root.'): Error | null => { +export const LnurlWithdrawInfoResponseValidate = (o?: LnurlWithdrawInfoResponse, opts: LnurlWithdrawInfoResponseOptions = {}, path: string = 'LnurlWithdrawInfoResponse::root.'): Error | null => { if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message') if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null') - if (typeof o.address !== 'string') return new Error(`${path}.address: is not a string`) - if (opts.address_CustomCheck && !opts.address_CustomCheck(o.address)) return new Error(`${path}.address: custom check failed`) + if (typeof o.tag !== 'string') return new Error(`${path}.tag: is not a string`) + if (opts.tag_CustomCheck && !opts.tag_CustomCheck(o.tag)) return new Error(`${path}.tag: custom check failed`) - return null -} + if (typeof o.callback !== 'string') return new Error(`${path}.callback: is not a string`) + if (opts.callback_CustomCheck && !opts.callback_CustomCheck(o.callback)) return new Error(`${path}.callback: custom check failed`) -export type HandleLnurlPayResponse = { - pr: string - routes: Empty[] -} -export const HandleLnurlPayResponseOptionalFields: [] = [] -export type HandleLnurlPayResponseOptions = OptionsBaseMessage & { - checkOptionalsAreSet?: [] - pr_CustomCheck?: (v: string) => boolean - routes_ItemOptions?: EmptyOptions - routes_CustomCheck?: (v: Empty[]) => boolean -} -export const HandleLnurlPayResponseValidate = (o?: HandleLnurlPayResponse, opts: HandleLnurlPayResponseOptions = {}, path: string = 'HandleLnurlPayResponse::root.'): Error | null => { - if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message') - if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null') + if (typeof o.k1 !== 'string') return new Error(`${path}.k1: is not a string`) + if (opts.k1_CustomCheck && !opts.k1_CustomCheck(o.k1)) return new Error(`${path}.k1: custom check failed`) - if (typeof o.pr !== 'string') return new Error(`${path}.pr: is not a string`) - if (opts.pr_CustomCheck && !opts.pr_CustomCheck(o.pr)) return new Error(`${path}.pr: custom check failed`) + if (typeof o.defaultDescription !== 'string') return new Error(`${path}.defaultDescription: is not a string`) + if (opts.defaultDescription_CustomCheck && !opts.defaultDescription_CustomCheck(o.defaultDescription)) return new Error(`${path}.defaultDescription: custom check failed`) - if (!Array.isArray(o.routes)) return new Error(`${path}.routes: is not an array`) - for (let index = 0; index < o.routes.length; index++) { - const routesErr = EmptyValidate(o.routes[index], opts.routes_ItemOptions, `${path}.routes[${index}]`) - if (routesErr !== null) return routesErr - } - if (opts.routes_CustomCheck && !opts.routes_CustomCheck(o.routes)) return new Error(`${path}.routes: custom check failed`) + if (typeof o.minWithdrawable !== 'number') return new Error(`${path}.minWithdrawable: is not a number`) + if (opts.minWithdrawable_CustomCheck && !opts.minWithdrawable_CustomCheck(o.minWithdrawable)) return new Error(`${path}.minWithdrawable: custom check failed`) + + if (typeof o.maxWithdrawable !== 'number') return new Error(`${path}.maxWithdrawable: is not a number`) + if (opts.maxWithdrawable_CustomCheck && !opts.maxWithdrawable_CustomCheck(o.maxWithdrawable)) return new Error(`${path}.maxWithdrawable: custom check failed`) + + if (typeof o.balanceCheck !== 'string') return new Error(`${path}.balanceCheck: is not a string`) + if (opts.balanceCheck_CustomCheck && !opts.balanceCheck_CustomCheck(o.balanceCheck)) return new Error(`${path}.balanceCheck: custom check failed`) + + if (typeof o.payLink !== 'string') return new Error(`${path}.payLink: is not a string`) + if (opts.payLink_CustomCheck && !opts.payLink_CustomCheck(o.payLink)) return new Error(`${path}.payLink: custom check failed`) return null } -export type UserOperation = { - paidAtUnix: number - type: UserOperationType - inbound: boolean - amount: number - identifier: string - operationId: string - service_fee: number - network_fee: number - confirmed: boolean - tx_hash: string - internal: boolean +export type UsageMetric = { + processed_at_ms: number + parsed_in_nano: number + auth_in_nano: number + validate_in_nano: number + handle_in_nano: number + rpc_name: string + batch: boolean + nostr: boolean + batch_size: number } -export const UserOperationOptionalFields: [] = [] -export type UserOperationOptions = OptionsBaseMessage & { +export const UsageMetricOptionalFields: [] = [] +export type UsageMetricOptions = OptionsBaseMessage & { checkOptionalsAreSet?: [] - paidAtUnix_CustomCheck?: (v: number) => boolean - type_CustomCheck?: (v: UserOperationType) => boolean - inbound_CustomCheck?: (v: boolean) => boolean - amount_CustomCheck?: (v: number) => boolean - identifier_CustomCheck?: (v: string) => boolean - operationId_CustomCheck?: (v: string) => boolean - service_fee_CustomCheck?: (v: number) => boolean - network_fee_CustomCheck?: (v: number) => boolean - confirmed_CustomCheck?: (v: boolean) => boolean - tx_hash_CustomCheck?: (v: string) => boolean - internal_CustomCheck?: (v: boolean) => boolean + processed_at_ms_CustomCheck?: (v: number) => boolean + parsed_in_nano_CustomCheck?: (v: number) => boolean + auth_in_nano_CustomCheck?: (v: number) => boolean + validate_in_nano_CustomCheck?: (v: number) => boolean + handle_in_nano_CustomCheck?: (v: number) => boolean + rpc_name_CustomCheck?: (v: string) => boolean + batch_CustomCheck?: (v: boolean) => boolean + nostr_CustomCheck?: (v: boolean) => boolean + batch_size_CustomCheck?: (v: number) => boolean } -export const UserOperationValidate = (o?: UserOperation, opts: UserOperationOptions = {}, path: string = 'UserOperation::root.'): Error | null => { +export const UsageMetricValidate = (o?: UsageMetric, opts: UsageMetricOptions = {}, path: string = 'UsageMetric::root.'): Error | null => { if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message') if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null') - if (typeof o.paidAtUnix !== 'number') return new Error(`${path}.paidAtUnix: is not a number`) - if (opts.paidAtUnix_CustomCheck && !opts.paidAtUnix_CustomCheck(o.paidAtUnix)) return new Error(`${path}.paidAtUnix: custom check failed`) - - if (!enumCheckUserOperationType(o.type)) return new Error(`${path}.type: is not a valid UserOperationType`) - if (opts.type_CustomCheck && !opts.type_CustomCheck(o.type)) return new Error(`${path}.type: custom check failed`) - - if (typeof o.inbound !== 'boolean') return new Error(`${path}.inbound: is not a boolean`) - if (opts.inbound_CustomCheck && !opts.inbound_CustomCheck(o.inbound)) return new Error(`${path}.inbound: custom check failed`) + if (typeof o.processed_at_ms !== 'number') return new Error(`${path}.processed_at_ms: is not a number`) + if (opts.processed_at_ms_CustomCheck && !opts.processed_at_ms_CustomCheck(o.processed_at_ms)) return new Error(`${path}.processed_at_ms: custom check failed`) - if (typeof o.amount !== 'number') return new Error(`${path}.amount: is not a number`) - if (opts.amount_CustomCheck && !opts.amount_CustomCheck(o.amount)) return new Error(`${path}.amount: custom check failed`) + if (typeof o.parsed_in_nano !== 'number') return new Error(`${path}.parsed_in_nano: is not a number`) + if (opts.parsed_in_nano_CustomCheck && !opts.parsed_in_nano_CustomCheck(o.parsed_in_nano)) return new Error(`${path}.parsed_in_nano: custom check failed`) - if (typeof o.identifier !== 'string') return new Error(`${path}.identifier: is not a string`) - if (opts.identifier_CustomCheck && !opts.identifier_CustomCheck(o.identifier)) return new Error(`${path}.identifier: custom check failed`) + if (typeof o.auth_in_nano !== 'number') return new Error(`${path}.auth_in_nano: is not a number`) + if (opts.auth_in_nano_CustomCheck && !opts.auth_in_nano_CustomCheck(o.auth_in_nano)) return new Error(`${path}.auth_in_nano: custom check failed`) - if (typeof o.operationId !== 'string') return new Error(`${path}.operationId: is not a string`) - if (opts.operationId_CustomCheck && !opts.operationId_CustomCheck(o.operationId)) return new Error(`${path}.operationId: custom check failed`) + if (typeof o.validate_in_nano !== 'number') return new Error(`${path}.validate_in_nano: is not a number`) + if (opts.validate_in_nano_CustomCheck && !opts.validate_in_nano_CustomCheck(o.validate_in_nano)) return new Error(`${path}.validate_in_nano: custom check failed`) - if (typeof o.service_fee !== 'number') return new Error(`${path}.service_fee: is not a number`) - if (opts.service_fee_CustomCheck && !opts.service_fee_CustomCheck(o.service_fee)) return new Error(`${path}.service_fee: custom check failed`) + if (typeof o.handle_in_nano !== 'number') return new Error(`${path}.handle_in_nano: is not a number`) + if (opts.handle_in_nano_CustomCheck && !opts.handle_in_nano_CustomCheck(o.handle_in_nano)) return new Error(`${path}.handle_in_nano: custom check failed`) - if (typeof o.network_fee !== 'number') return new Error(`${path}.network_fee: is not a number`) - if (opts.network_fee_CustomCheck && !opts.network_fee_CustomCheck(o.network_fee)) return new Error(`${path}.network_fee: custom check failed`) + if (typeof o.rpc_name !== 'string') return new Error(`${path}.rpc_name: is not a string`) + if (opts.rpc_name_CustomCheck && !opts.rpc_name_CustomCheck(o.rpc_name)) return new Error(`${path}.rpc_name: custom check failed`) - if (typeof o.confirmed !== 'boolean') return new Error(`${path}.confirmed: is not a boolean`) - if (opts.confirmed_CustomCheck && !opts.confirmed_CustomCheck(o.confirmed)) return new Error(`${path}.confirmed: custom check failed`) + if (typeof o.batch !== 'boolean') return new Error(`${path}.batch: is not a boolean`) + if (opts.batch_CustomCheck && !opts.batch_CustomCheck(o.batch)) return new Error(`${path}.batch: custom check failed`) - if (typeof o.tx_hash !== 'string') return new Error(`${path}.tx_hash: is not a string`) - if (opts.tx_hash_CustomCheck && !opts.tx_hash_CustomCheck(o.tx_hash)) return new Error(`${path}.tx_hash: custom check failed`) + if (typeof o.nostr !== 'boolean') return new Error(`${path}.nostr: is not a boolean`) + if (opts.nostr_CustomCheck && !opts.nostr_CustomCheck(o.nostr)) return new Error(`${path}.nostr: custom check failed`) - if (typeof o.internal !== 'boolean') return new Error(`${path}.internal: is not a boolean`) - if (opts.internal_CustomCheck && !opts.internal_CustomCheck(o.internal)) return new Error(`${path}.internal: custom check failed`) + if (typeof o.batch_size !== 'number') return new Error(`${path}.batch_size: is not a number`) + if (opts.batch_size_CustomCheck && !opts.batch_size_CustomCheck(o.batch_size)) return new Error(`${path}.batch_size: custom check failed`) return null } -export type ClosureMigration = { - closes_at_unix: number +export type UsersInfo = { + total: number + no_balance: number + negative_balance: number + always_been_inactive: number + balance_avg: number + balance_median: number } -export const ClosureMigrationOptionalFields: [] = [] -export type ClosureMigrationOptions = OptionsBaseMessage & { +export const UsersInfoOptionalFields: [] = [] +export type UsersInfoOptions = OptionsBaseMessage & { checkOptionalsAreSet?: [] - closes_at_unix_CustomCheck?: (v: number) => boolean + total_CustomCheck?: (v: number) => boolean + no_balance_CustomCheck?: (v: number) => boolean + negative_balance_CustomCheck?: (v: number) => boolean + always_been_inactive_CustomCheck?: (v: number) => boolean + balance_avg_CustomCheck?: (v: number) => boolean + balance_median_CustomCheck?: (v: number) => boolean } -export const ClosureMigrationValidate = (o?: ClosureMigration, opts: ClosureMigrationOptions = {}, path: string = 'ClosureMigration::root.'): Error | null => { +export const UsersInfoValidate = (o?: UsersInfo, opts: UsersInfoOptions = {}, path: string = 'UsersInfo::root.'): Error | null => { if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message') if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null') - if (typeof o.closes_at_unix !== 'number') return new Error(`${path}.closes_at_unix: is not a number`) - if (opts.closes_at_unix_CustomCheck && !opts.closes_at_unix_CustomCheck(o.closes_at_unix)) return new Error(`${path}.closes_at_unix: custom check failed`) + if (typeof o.total !== 'number') return new Error(`${path}.total: is not a number`) + if (opts.total_CustomCheck && !opts.total_CustomCheck(o.total)) return new Error(`${path}.total: custom check failed`) + + if (typeof o.no_balance !== 'number') return new Error(`${path}.no_balance: is not a number`) + if (opts.no_balance_CustomCheck && !opts.no_balance_CustomCheck(o.no_balance)) return new Error(`${path}.no_balance: custom check failed`) + + if (typeof o.negative_balance !== 'number') return new Error(`${path}.negative_balance: is not a number`) + if (opts.negative_balance_CustomCheck && !opts.negative_balance_CustomCheck(o.negative_balance)) return new Error(`${path}.negative_balance: custom check failed`) + + if (typeof o.always_been_inactive !== 'number') return new Error(`${path}.always_been_inactive: is not a number`) + if (opts.always_been_inactive_CustomCheck && !opts.always_been_inactive_CustomCheck(o.always_been_inactive)) return new Error(`${path}.always_been_inactive: custom check failed`) + + if (typeof o.balance_avg !== 'number') return new Error(`${path}.balance_avg: is not a number`) + if (opts.balance_avg_CustomCheck && !opts.balance_avg_CustomCheck(o.balance_avg)) return new Error(`${path}.balance_avg: custom check failed`) + + if (typeof o.balance_median !== 'number') return new Error(`${path}.balance_median: is not a number`) + if (opts.balance_median_CustomCheck && !opts.balance_median_CustomCheck(o.balance_median)) return new Error(`${path}.balance_median: custom check failed`) return null } @@ -492,202 +512,183 @@ export const BanUserRequestValidate = (o?: BanUserRequest, opts: BanUserRequestO return null } -export type NewAddressRequest = { - addressType: AddressType +export type BanUserResponse = { + balance_sats: number + banned_app_users: BannedAppUser[] } -export const NewAddressRequestOptionalFields: [] = [] -export type NewAddressRequestOptions = OptionsBaseMessage & { +export const BanUserResponseOptionalFields: [] = [] +export type BanUserResponseOptions = OptionsBaseMessage & { checkOptionalsAreSet?: [] - addressType_CustomCheck?: (v: AddressType) => boolean + balance_sats_CustomCheck?: (v: number) => boolean + banned_app_users_ItemOptions?: BannedAppUserOptions + banned_app_users_CustomCheck?: (v: BannedAppUser[]) => boolean } -export const NewAddressRequestValidate = (o?: NewAddressRequest, opts: NewAddressRequestOptions = {}, path: string = 'NewAddressRequest::root.'): Error | null => { +export const BanUserResponseValidate = (o?: BanUserResponse, opts: BanUserResponseOptions = {}, path: string = 'BanUserResponse::root.'): Error | null => { if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message') if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null') - if (!enumCheckAddressType(o.addressType)) return new Error(`${path}.addressType: is not a valid AddressType`) - if (opts.addressType_CustomCheck && !opts.addressType_CustomCheck(o.addressType)) return new Error(`${path}.addressType: custom check failed`) + if (typeof o.balance_sats !== 'number') return new Error(`${path}.balance_sats: is not a number`) + if (opts.balance_sats_CustomCheck && !opts.balance_sats_CustomCheck(o.balance_sats)) return new Error(`${path}.balance_sats: custom check failed`) + + if (!Array.isArray(o.banned_app_users)) return new Error(`${path}.banned_app_users: is not an array`) + for (let index = 0; index < o.banned_app_users.length; index++) { + const banned_app_usersErr = BannedAppUserValidate(o.banned_app_users[index], opts.banned_app_users_ItemOptions, `${path}.banned_app_users[${index}]`) + if (banned_app_usersErr !== null) return banned_app_usersErr + } + if (opts.banned_app_users_CustomCheck && !opts.banned_app_users_CustomCheck(o.banned_app_users)) return new Error(`${path}.banned_app_users: custom check failed`) return null } -export type PayInvoiceResponse = { - preimage: string - amount_paid: number - operation_id: string - service_fee: number - network_fee: number - latest_balance: number +export type UserOperations = { + fromIndex: number + toIndex: number + operations: UserOperation[] } -export const PayInvoiceResponseOptionalFields: [] = [] -export type PayInvoiceResponseOptions = OptionsBaseMessage & { +export const UserOperationsOptionalFields: [] = [] +export type UserOperationsOptions = OptionsBaseMessage & { checkOptionalsAreSet?: [] - preimage_CustomCheck?: (v: string) => boolean - amount_paid_CustomCheck?: (v: number) => boolean - operation_id_CustomCheck?: (v: string) => boolean - service_fee_CustomCheck?: (v: number) => boolean - network_fee_CustomCheck?: (v: number) => boolean - latest_balance_CustomCheck?: (v: number) => boolean + fromIndex_CustomCheck?: (v: number) => boolean + toIndex_CustomCheck?: (v: number) => boolean + operations_ItemOptions?: UserOperationOptions + operations_CustomCheck?: (v: UserOperation[]) => boolean } -export const PayInvoiceResponseValidate = (o?: PayInvoiceResponse, opts: PayInvoiceResponseOptions = {}, path: string = 'PayInvoiceResponse::root.'): Error | null => { +export const UserOperationsValidate = (o?: UserOperations, opts: UserOperationsOptions = {}, path: string = 'UserOperations::root.'): Error | null => { if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message') if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null') - if (typeof o.preimage !== 'string') return new Error(`${path}.preimage: is not a string`) - if (opts.preimage_CustomCheck && !opts.preimage_CustomCheck(o.preimage)) return new Error(`${path}.preimage: custom check failed`) - - if (typeof o.amount_paid !== 'number') return new Error(`${path}.amount_paid: is not a number`) - if (opts.amount_paid_CustomCheck && !opts.amount_paid_CustomCheck(o.amount_paid)) return new Error(`${path}.amount_paid: custom check failed`) - - if (typeof o.operation_id !== 'string') return new Error(`${path}.operation_id: is not a string`) - if (opts.operation_id_CustomCheck && !opts.operation_id_CustomCheck(o.operation_id)) return new Error(`${path}.operation_id: custom check failed`) - - if (typeof o.service_fee !== 'number') return new Error(`${path}.service_fee: is not a number`) - if (opts.service_fee_CustomCheck && !opts.service_fee_CustomCheck(o.service_fee)) return new Error(`${path}.service_fee: custom check failed`) + if (typeof o.fromIndex !== 'number') return new Error(`${path}.fromIndex: is not a number`) + if (opts.fromIndex_CustomCheck && !opts.fromIndex_CustomCheck(o.fromIndex)) return new Error(`${path}.fromIndex: custom check failed`) - if (typeof o.network_fee !== 'number') return new Error(`${path}.network_fee: is not a number`) - if (opts.network_fee_CustomCheck && !opts.network_fee_CustomCheck(o.network_fee)) return new Error(`${path}.network_fee: custom check failed`) + if (typeof o.toIndex !== 'number') return new Error(`${path}.toIndex: is not a number`) + if (opts.toIndex_CustomCheck && !opts.toIndex_CustomCheck(o.toIndex)) return new Error(`${path}.toIndex: custom check failed`) - if (typeof o.latest_balance !== 'number') return new Error(`${path}.latest_balance: is not a number`) - if (opts.latest_balance_CustomCheck && !opts.latest_balance_CustomCheck(o.latest_balance)) return new Error(`${path}.latest_balance: custom check failed`) + if (!Array.isArray(o.operations)) return new Error(`${path}.operations: is not an array`) + for (let index = 0; index < o.operations.length; index++) { + const operationsErr = UserOperationValidate(o.operations[index], opts.operations_ItemOptions, `${path}.operations[${index}]`) + if (operationsErr !== null) return operationsErr + } + if (opts.operations_CustomCheck && !opts.operations_CustomCheck(o.operations)) return new Error(`${path}.operations: custom check failed`) return null } -export type OpenChannelResponse = { - channelId: string +export type RequestNPubLinkingTokenRequest = { + user_identifier: string } -export const OpenChannelResponseOptionalFields: [] = [] -export type OpenChannelResponseOptions = OptionsBaseMessage & { +export const RequestNPubLinkingTokenRequestOptionalFields: [] = [] +export type RequestNPubLinkingTokenRequestOptions = OptionsBaseMessage & { checkOptionalsAreSet?: [] - channelId_CustomCheck?: (v: string) => boolean + user_identifier_CustomCheck?: (v: string) => boolean } -export const OpenChannelResponseValidate = (o?: OpenChannelResponse, opts: OpenChannelResponseOptions = {}, path: string = 'OpenChannelResponse::root.'): Error | null => { +export const RequestNPubLinkingTokenRequestValidate = (o?: RequestNPubLinkingTokenRequest, opts: RequestNPubLinkingTokenRequestOptions = {}, path: string = 'RequestNPubLinkingTokenRequest::root.'): Error | null => { if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message') if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null') - if (typeof o.channelId !== 'string') return new Error(`${path}.channelId: is not a string`) - if (opts.channelId_CustomCheck && !opts.channelId_CustomCheck(o.channelId)) return new Error(`${path}.channelId: custom check failed`) + if (typeof o.user_identifier !== 'string') return new Error(`${path}.user_identifier: is not a string`) + if (opts.user_identifier_CustomCheck && !opts.user_identifier_CustomCheck(o.user_identifier)) return new Error(`${path}.user_identifier: custom check failed`) return null } -export type GetProductBuyLinkResponse = { - link: string +export type Product = { + id: string + name: string + price_sats: number } -export const GetProductBuyLinkResponseOptionalFields: [] = [] -export type GetProductBuyLinkResponseOptions = OptionsBaseMessage & { +export const ProductOptionalFields: [] = [] +export type ProductOptions = OptionsBaseMessage & { checkOptionalsAreSet?: [] - link_CustomCheck?: (v: string) => boolean + id_CustomCheck?: (v: string) => boolean + name_CustomCheck?: (v: string) => boolean + price_sats_CustomCheck?: (v: number) => boolean } -export const GetProductBuyLinkResponseValidate = (o?: GetProductBuyLinkResponse, opts: GetProductBuyLinkResponseOptions = {}, path: string = 'GetProductBuyLinkResponse::root.'): Error | null => { +export const ProductValidate = (o?: Product, opts: ProductOptions = {}, path: string = 'Product::root.'): Error | null => { if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message') if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null') - if (typeof o.link !== 'string') return new Error(`${path}.link: is not a string`) - if (opts.link_CustomCheck && !opts.link_CustomCheck(o.link)) return new Error(`${path}.link: custom check failed`) - - return null -} - -export type LiveUserOperation = { - operation: UserOperation - latest_balance: number -} -export const LiveUserOperationOptionalFields: [] = [] -export type LiveUserOperationOptions = OptionsBaseMessage & { - checkOptionalsAreSet?: [] - operation_Options?: UserOperationOptions - latest_balance_CustomCheck?: (v: number) => boolean -} -export const LiveUserOperationValidate = (o?: LiveUserOperation, opts: LiveUserOperationOptions = {}, path: string = 'LiveUserOperation::root.'): Error | null => { - if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message') - if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null') + if (typeof o.id !== 'string') return new Error(`${path}.id: is not a string`) + if (opts.id_CustomCheck && !opts.id_CustomCheck(o.id)) return new Error(`${path}.id: custom check failed`) - const operationErr = UserOperationValidate(o.operation, opts.operation_Options, `${path}.operation`) - if (operationErr !== null) return operationErr - + if (typeof o.name !== 'string') return new Error(`${path}.name: is not a string`) + if (opts.name_CustomCheck && !opts.name_CustomCheck(o.name)) return new Error(`${path}.name: custom check failed`) - if (typeof o.latest_balance !== 'number') return new Error(`${path}.latest_balance: is not a number`) - if (opts.latest_balance_CustomCheck && !opts.latest_balance_CustomCheck(o.latest_balance)) return new Error(`${path}.latest_balance: custom check failed`) + if (typeof o.price_sats !== 'number') return new Error(`${path}.price_sats: is not a number`) + if (opts.price_sats_CustomCheck && !opts.price_sats_CustomCheck(o.price_sats)) return new Error(`${path}.price_sats: custom check failed`) return null } -export type ClosedChannel = { - channel_id: string - capacity: number - closed_height: number +export type LinkNPubThroughTokenRequest = { + token: string + nostr_pub: string } -export const ClosedChannelOptionalFields: [] = [] -export type ClosedChannelOptions = OptionsBaseMessage & { +export const LinkNPubThroughTokenRequestOptionalFields: [] = [] +export type LinkNPubThroughTokenRequestOptions = OptionsBaseMessage & { checkOptionalsAreSet?: [] - channel_id_CustomCheck?: (v: string) => boolean - capacity_CustomCheck?: (v: number) => boolean - closed_height_CustomCheck?: (v: number) => boolean + token_CustomCheck?: (v: string) => boolean + nostr_pub_CustomCheck?: (v: string) => boolean } -export const ClosedChannelValidate = (o?: ClosedChannel, opts: ClosedChannelOptions = {}, path: string = 'ClosedChannel::root.'): Error | null => { +export const LinkNPubThroughTokenRequestValidate = (o?: LinkNPubThroughTokenRequest, opts: LinkNPubThroughTokenRequestOptions = {}, path: string = 'LinkNPubThroughTokenRequest::root.'): Error | null => { if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message') if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null') - if (typeof o.channel_id !== 'string') return new Error(`${path}.channel_id: is not a string`) - if (opts.channel_id_CustomCheck && !opts.channel_id_CustomCheck(o.channel_id)) return new Error(`${path}.channel_id: custom check failed`) - - if (typeof o.capacity !== 'number') return new Error(`${path}.capacity: is not a number`) - if (opts.capacity_CustomCheck && !opts.capacity_CustomCheck(o.capacity)) return new Error(`${path}.capacity: custom check failed`) + if (typeof o.token !== 'string') return new Error(`${path}.token: is not a string`) + if (opts.token_CustomCheck && !opts.token_CustomCheck(o.token)) return new Error(`${path}.token: custom check failed`) - if (typeof o.closed_height !== 'number') return new Error(`${path}.closed_height: is not a number`) - if (opts.closed_height_CustomCheck && !opts.closed_height_CustomCheck(o.closed_height)) return new Error(`${path}.closed_height: custom check failed`) + if (typeof o.nostr_pub !== 'string') return new Error(`${path}.nostr_pub: is not a string`) + if (opts.nostr_pub_CustomCheck && !opts.nostr_pub_CustomCheck(o.nostr_pub)) return new Error(`${path}.nostr_pub: custom check failed`) return null } -export type AddAppRequest = { - name: string - allow_user_creation: boolean +export type EncryptionExchangeRequest = { + publicKey: string + deviceId: string } -export const AddAppRequestOptionalFields: [] = [] -export type AddAppRequestOptions = OptionsBaseMessage & { +export const EncryptionExchangeRequestOptionalFields: [] = [] +export type EncryptionExchangeRequestOptions = OptionsBaseMessage & { checkOptionalsAreSet?: [] - name_CustomCheck?: (v: string) => boolean - allow_user_creation_CustomCheck?: (v: boolean) => boolean + publicKey_CustomCheck?: (v: string) => boolean + deviceId_CustomCheck?: (v: string) => boolean } -export const AddAppRequestValidate = (o?: AddAppRequest, opts: AddAppRequestOptions = {}, path: string = 'AddAppRequest::root.'): Error | null => { +export const EncryptionExchangeRequestValidate = (o?: EncryptionExchangeRequest, opts: EncryptionExchangeRequestOptions = {}, path: string = 'EncryptionExchangeRequest::root.'): Error | null => { if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message') if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null') - if (typeof o.name !== 'string') return new Error(`${path}.name: is not a string`) - if (opts.name_CustomCheck && !opts.name_CustomCheck(o.name)) return new Error(`${path}.name: custom check failed`) + if (typeof o.publicKey !== 'string') return new Error(`${path}.publicKey: is not a string`) + if (opts.publicKey_CustomCheck && !opts.publicKey_CustomCheck(o.publicKey)) return new Error(`${path}.publicKey: custom check failed`) - if (typeof o.allow_user_creation !== 'boolean') return new Error(`${path}.allow_user_creation: is not a boolean`) - if (opts.allow_user_creation_CustomCheck && !opts.allow_user_creation_CustomCheck(o.allow_user_creation)) return new Error(`${path}.allow_user_creation: custom check failed`) + if (typeof o.deviceId !== 'string') return new Error(`${path}.deviceId: is not a string`) + if (opts.deviceId_CustomCheck && !opts.deviceId_CustomCheck(o.deviceId)) return new Error(`${path}.deviceId: custom check failed`) return null } -export type BanUserResponse = { - balance_sats: number - banned_app_users: BannedAppUser[] +export type PayAppUserInvoiceRequest = { + user_identifier: string + invoice: string + amount: number } -export const BanUserResponseOptionalFields: [] = [] -export type BanUserResponseOptions = OptionsBaseMessage & { +export const PayAppUserInvoiceRequestOptionalFields: [] = [] +export type PayAppUserInvoiceRequestOptions = OptionsBaseMessage & { checkOptionalsAreSet?: [] - balance_sats_CustomCheck?: (v: number) => boolean - banned_app_users_ItemOptions?: BannedAppUserOptions - banned_app_users_CustomCheck?: (v: BannedAppUser[]) => boolean + user_identifier_CustomCheck?: (v: string) => boolean + invoice_CustomCheck?: (v: string) => boolean + amount_CustomCheck?: (v: number) => boolean } -export const BanUserResponseValidate = (o?: BanUserResponse, opts: BanUserResponseOptions = {}, path: string = 'BanUserResponse::root.'): Error | null => { +export const PayAppUserInvoiceRequestValidate = (o?: PayAppUserInvoiceRequest, opts: PayAppUserInvoiceRequestOptions = {}, path: string = 'PayAppUserInvoiceRequest::root.'): Error | null => { if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message') if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null') - if (typeof o.balance_sats !== 'number') return new Error(`${path}.balance_sats: is not a number`) - if (opts.balance_sats_CustomCheck && !opts.balance_sats_CustomCheck(o.balance_sats)) return new Error(`${path}.balance_sats: custom check failed`) + if (typeof o.user_identifier !== 'string') return new Error(`${path}.user_identifier: is not a string`) + if (opts.user_identifier_CustomCheck && !opts.user_identifier_CustomCheck(o.user_identifier)) return new Error(`${path}.user_identifier: custom check failed`) - if (!Array.isArray(o.banned_app_users)) return new Error(`${path}.banned_app_users: is not an array`) - for (let index = 0; index < o.banned_app_users.length; index++) { - const banned_app_usersErr = BannedAppUserValidate(o.banned_app_users[index], opts.banned_app_users_ItemOptions, `${path}.banned_app_users[${index}]`) - if (banned_app_usersErr !== null) return banned_app_usersErr - } - if (opts.banned_app_users_CustomCheck && !opts.banned_app_users_CustomCheck(o.banned_app_users)) return new Error(`${path}.banned_app_users: custom check failed`) + if (typeof o.invoice !== 'string') return new Error(`${path}.invoice: is not a string`) + if (opts.invoice_CustomCheck && !opts.invoice_CustomCheck(o.invoice)) return new Error(`${path}.invoice: custom check failed`) + + if (typeof o.amount !== 'number') return new Error(`${path}.amount: is not a number`) + if (opts.amount_CustomCheck && !opts.amount_CustomCheck(o.amount)) return new Error(`${path}.amount: custom check failed`) return null } @@ -715,476 +716,413 @@ export const SendAppUserToAppPaymentRequestValidate = (o?: SendAppUserToAppPayme return null } -export type LndMetricsRequest = { - from_unix?: number - to_unix?: number +export type UserOperation = { + paidAtUnix: number + type: UserOperationType + inbound: boolean + amount: number + identifier: string + operationId: string + service_fee: number + network_fee: number + confirmed: boolean + tx_hash: string + internal: boolean } -export type LndMetricsRequestOptionalField = 'from_unix' | 'to_unix' -export const LndMetricsRequestOptionalFields: LndMetricsRequestOptionalField[] = ['from_unix', 'to_unix'] -export type LndMetricsRequestOptions = OptionsBaseMessage & { - checkOptionalsAreSet?: LndMetricsRequestOptionalField[] - from_unix_CustomCheck?: (v?: number) => boolean - to_unix_CustomCheck?: (v?: number) => boolean +export const UserOperationOptionalFields: [] = [] +export type UserOperationOptions = OptionsBaseMessage & { + checkOptionalsAreSet?: [] + paidAtUnix_CustomCheck?: (v: number) => boolean + type_CustomCheck?: (v: UserOperationType) => boolean + inbound_CustomCheck?: (v: boolean) => boolean + amount_CustomCheck?: (v: number) => boolean + identifier_CustomCheck?: (v: string) => boolean + operationId_CustomCheck?: (v: string) => boolean + service_fee_CustomCheck?: (v: number) => boolean + network_fee_CustomCheck?: (v: number) => boolean + confirmed_CustomCheck?: (v: boolean) => boolean + tx_hash_CustomCheck?: (v: string) => boolean + internal_CustomCheck?: (v: boolean) => boolean } -export const LndMetricsRequestValidate = (o?: LndMetricsRequest, opts: LndMetricsRequestOptions = {}, path: string = 'LndMetricsRequest::root.'): Error | null => { +export const UserOperationValidate = (o?: UserOperation, opts: UserOperationOptions = {}, path: string = 'UserOperation::root.'): Error | null => { if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message') if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null') - if ((o.from_unix || opts.allOptionalsAreSet || opts.checkOptionalsAreSet?.includes('from_unix')) && typeof o.from_unix !== 'number') return new Error(`${path}.from_unix: is not a number`) - if (opts.from_unix_CustomCheck && !opts.from_unix_CustomCheck(o.from_unix)) return new Error(`${path}.from_unix: custom check failed`) + if (typeof o.paidAtUnix !== 'number') return new Error(`${path}.paidAtUnix: is not a number`) + if (opts.paidAtUnix_CustomCheck && !opts.paidAtUnix_CustomCheck(o.paidAtUnix)) return new Error(`${path}.paidAtUnix: custom check failed`) - if ((o.to_unix || opts.allOptionalsAreSet || opts.checkOptionalsAreSet?.includes('to_unix')) && typeof o.to_unix !== 'number') return new Error(`${path}.to_unix: is not a number`) - if (opts.to_unix_CustomCheck && !opts.to_unix_CustomCheck(o.to_unix)) return new Error(`${path}.to_unix: custom check failed`) + if (!enumCheckUserOperationType(o.type)) return new Error(`${path}.type: is not a valid UserOperationType`) + if (opts.type_CustomCheck && !opts.type_CustomCheck(o.type)) return new Error(`${path}.type: custom check failed`) - return null -} + if (typeof o.inbound !== 'boolean') return new Error(`${path}.inbound: is not a boolean`) + if (opts.inbound_CustomCheck && !opts.inbound_CustomCheck(o.inbound)) return new Error(`${path}.inbound: custom check failed`) -export type LndMetrics = { - nodes: LndNodeMetrics[] -} -export const LndMetricsOptionalFields: [] = [] -export type LndMetricsOptions = OptionsBaseMessage & { - checkOptionalsAreSet?: [] - nodes_ItemOptions?: LndNodeMetricsOptions - nodes_CustomCheck?: (v: LndNodeMetrics[]) => boolean -} -export const LndMetricsValidate = (o?: LndMetrics, opts: LndMetricsOptions = {}, path: string = 'LndMetrics::root.'): Error | null => { - if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message') - if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null') + if (typeof o.amount !== 'number') return new Error(`${path}.amount: is not a number`) + if (opts.amount_CustomCheck && !opts.amount_CustomCheck(o.amount)) return new Error(`${path}.amount: custom check failed`) - if (!Array.isArray(o.nodes)) return new Error(`${path}.nodes: is not an array`) - for (let index = 0; index < o.nodes.length; index++) { - const nodesErr = LndNodeMetricsValidate(o.nodes[index], opts.nodes_ItemOptions, `${path}.nodes[${index}]`) - if (nodesErr !== null) return nodesErr - } - if (opts.nodes_CustomCheck && !opts.nodes_CustomCheck(o.nodes)) return new Error(`${path}.nodes: custom check failed`) + if (typeof o.identifier !== 'string') return new Error(`${path}.identifier: is not a string`) + if (opts.identifier_CustomCheck && !opts.identifier_CustomCheck(o.identifier)) return new Error(`${path}.identifier: custom check failed`) + + if (typeof o.operationId !== 'string') return new Error(`${path}.operationId: is not a string`) + if (opts.operationId_CustomCheck && !opts.operationId_CustomCheck(o.operationId)) return new Error(`${path}.operationId: custom check failed`) + + if (typeof o.service_fee !== 'number') return new Error(`${path}.service_fee: is not a number`) + if (opts.service_fee_CustomCheck && !opts.service_fee_CustomCheck(o.service_fee)) return new Error(`${path}.service_fee: custom check failed`) + + if (typeof o.network_fee !== 'number') return new Error(`${path}.network_fee: is not a number`) + if (opts.network_fee_CustomCheck && !opts.network_fee_CustomCheck(o.network_fee)) return new Error(`${path}.network_fee: custom check failed`) + + if (typeof o.confirmed !== 'boolean') return new Error(`${path}.confirmed: is not a boolean`) + if (opts.confirmed_CustomCheck && !opts.confirmed_CustomCheck(o.confirmed)) return new Error(`${path}.confirmed: custom check failed`) + + if (typeof o.tx_hash !== 'string') return new Error(`${path}.tx_hash: is not a string`) + if (opts.tx_hash_CustomCheck && !opts.tx_hash_CustomCheck(o.tx_hash)) return new Error(`${path}.tx_hash: custom check failed`) + + if (typeof o.internal !== 'boolean') return new Error(`${path}.internal: is not a boolean`) + if (opts.internal_CustomCheck && !opts.internal_CustomCheck(o.internal)) return new Error(`${path}.internal: custom check failed`) return null } -export type HttpCreds = { - url: string - token: string +export type SendAppUserToAppUserPaymentRequest = { + from_user_identifier: string + to_user_identifier: string + amount: number } -export const HttpCredsOptionalFields: [] = [] -export type HttpCredsOptions = OptionsBaseMessage & { +export const SendAppUserToAppUserPaymentRequestOptionalFields: [] = [] +export type SendAppUserToAppUserPaymentRequestOptions = OptionsBaseMessage & { checkOptionalsAreSet?: [] - url_CustomCheck?: (v: string) => boolean - token_CustomCheck?: (v: string) => boolean + from_user_identifier_CustomCheck?: (v: string) => boolean + to_user_identifier_CustomCheck?: (v: string) => boolean + amount_CustomCheck?: (v: number) => boolean } -export const HttpCredsValidate = (o?: HttpCreds, opts: HttpCredsOptions = {}, path: string = 'HttpCreds::root.'): Error | null => { +export const SendAppUserToAppUserPaymentRequestValidate = (o?: SendAppUserToAppUserPaymentRequest, opts: SendAppUserToAppUserPaymentRequestOptions = {}, path: string = 'SendAppUserToAppUserPaymentRequest::root.'): Error | null => { if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message') if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null') - if (typeof o.url !== 'string') return new Error(`${path}.url: is not a string`) - if (opts.url_CustomCheck && !opts.url_CustomCheck(o.url)) return new Error(`${path}.url: custom check failed`) + if (typeof o.from_user_identifier !== 'string') return new Error(`${path}.from_user_identifier: is not a string`) + if (opts.from_user_identifier_CustomCheck && !opts.from_user_identifier_CustomCheck(o.from_user_identifier)) return new Error(`${path}.from_user_identifier: custom check failed`) - if (typeof o.token !== 'string') return new Error(`${path}.token: is not a string`) - if (opts.token_CustomCheck && !opts.token_CustomCheck(o.token)) return new Error(`${path}.token: custom check failed`) + if (typeof o.to_user_identifier !== 'string') return new Error(`${path}.to_user_identifier: is not a string`) + if (opts.to_user_identifier_CustomCheck && !opts.to_user_identifier_CustomCheck(o.to_user_identifier)) return new Error(`${path}.to_user_identifier: custom check failed`) + + if (typeof o.amount !== 'number') return new Error(`${path}.amount: is not a number`) + if (opts.amount_CustomCheck && !opts.amount_CustomCheck(o.amount)) return new Error(`${path}.amount: custom check failed`) return null } -export type AppsMetricsRequest = { - from_unix?: number - to_unix?: number - include_operations?: boolean +export type NewInvoiceRequest = { + amountSats: number + memo: string } -export type AppsMetricsRequestOptionalField = 'from_unix' | 'to_unix' | 'include_operations' -export const AppsMetricsRequestOptionalFields: AppsMetricsRequestOptionalField[] = ['from_unix', 'to_unix', 'include_operations'] -export type AppsMetricsRequestOptions = OptionsBaseMessage & { - checkOptionalsAreSet?: AppsMetricsRequestOptionalField[] - from_unix_CustomCheck?: (v?: number) => boolean - to_unix_CustomCheck?: (v?: number) => boolean - include_operations_CustomCheck?: (v?: boolean) => boolean +export const NewInvoiceRequestOptionalFields: [] = [] +export type NewInvoiceRequestOptions = OptionsBaseMessage & { + checkOptionalsAreSet?: [] + amountSats_CustomCheck?: (v: number) => boolean + memo_CustomCheck?: (v: string) => boolean } -export const AppsMetricsRequestValidate = (o?: AppsMetricsRequest, opts: AppsMetricsRequestOptions = {}, path: string = 'AppsMetricsRequest::root.'): Error | null => { +export const NewInvoiceRequestValidate = (o?: NewInvoiceRequest, opts: NewInvoiceRequestOptions = {}, path: string = 'NewInvoiceRequest::root.'): Error | null => { if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message') if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null') - if ((o.from_unix || opts.allOptionalsAreSet || opts.checkOptionalsAreSet?.includes('from_unix')) && typeof o.from_unix !== 'number') return new Error(`${path}.from_unix: is not a number`) - if (opts.from_unix_CustomCheck && !opts.from_unix_CustomCheck(o.from_unix)) return new Error(`${path}.from_unix: custom check failed`) - - if ((o.to_unix || opts.allOptionalsAreSet || opts.checkOptionalsAreSet?.includes('to_unix')) && typeof o.to_unix !== 'number') return new Error(`${path}.to_unix: is not a number`) - if (opts.to_unix_CustomCheck && !opts.to_unix_CustomCheck(o.to_unix)) return new Error(`${path}.to_unix: custom check failed`) + if (typeof o.amountSats !== 'number') return new Error(`${path}.amountSats: is not a number`) + if (opts.amountSats_CustomCheck && !opts.amountSats_CustomCheck(o.amountSats)) return new Error(`${path}.amountSats: custom check failed`) - if ((o.include_operations || opts.allOptionalsAreSet || opts.checkOptionalsAreSet?.includes('include_operations')) && typeof o.include_operations !== 'boolean') return new Error(`${path}.include_operations: is not a boolean`) - if (opts.include_operations_CustomCheck && !opts.include_operations_CustomCheck(o.include_operations)) return new Error(`${path}.include_operations: custom check failed`) + if (typeof o.memo !== 'string') return new Error(`${path}.memo: is not a string`) + if (opts.memo_CustomCheck && !opts.memo_CustomCheck(o.memo)) return new Error(`${path}.memo: custom check failed`) return null } -export type AuthAppRequest = { - name: string - allow_user_creation?: boolean +export type MigrationUpdate = { + closure?: ClosureMigration + relays?: RelaysMigration } -export type AuthAppRequestOptionalField = 'allow_user_creation' -export const AuthAppRequestOptionalFields: AuthAppRequestOptionalField[] = ['allow_user_creation'] -export type AuthAppRequestOptions = OptionsBaseMessage & { - checkOptionalsAreSet?: AuthAppRequestOptionalField[] - name_CustomCheck?: (v: string) => boolean - allow_user_creation_CustomCheck?: (v?: boolean) => boolean +export type MigrationUpdateOptionalField = 'closure' | 'relays' +export const MigrationUpdateOptionalFields: MigrationUpdateOptionalField[] = ['closure', 'relays'] +export type MigrationUpdateOptions = OptionsBaseMessage & { + checkOptionalsAreSet?: MigrationUpdateOptionalField[] + closure_Options?: ClosureMigrationOptions + relays_Options?: RelaysMigrationOptions } -export const AuthAppRequestValidate = (o?: AuthAppRequest, opts: AuthAppRequestOptions = {}, path: string = 'AuthAppRequest::root.'): Error | null => { +export const MigrationUpdateValidate = (o?: MigrationUpdate, opts: MigrationUpdateOptions = {}, path: string = 'MigrationUpdate::root.'): Error | null => { if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message') if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null') - if (typeof o.name !== 'string') return new Error(`${path}.name: is not a string`) - if (opts.name_CustomCheck && !opts.name_CustomCheck(o.name)) return new Error(`${path}.name: custom check failed`) + if (typeof o.closure === 'object' || opts.allOptionalsAreSet || opts.checkOptionalsAreSet?.includes('closure')) { + const closureErr = ClosureMigrationValidate(o.closure, opts.closure_Options, `${path}.closure`) + if (closureErr !== null) return closureErr + } + - if ((o.allow_user_creation || opts.allOptionalsAreSet || opts.checkOptionalsAreSet?.includes('allow_user_creation')) && typeof o.allow_user_creation !== 'boolean') return new Error(`${path}.allow_user_creation: is not a boolean`) - if (opts.allow_user_creation_CustomCheck && !opts.allow_user_creation_CustomCheck(o.allow_user_creation)) return new Error(`${path}.allow_user_creation: custom check failed`) + if (typeof o.relays === 'object' || opts.allOptionalsAreSet || opts.checkOptionalsAreSet?.includes('relays')) { + const relaysErr = RelaysMigrationValidate(o.relays, opts.relays_Options, `${path}.relays`) + if (relaysErr !== null) return relaysErr + } + return null } -export type LnurlWithdrawInfoResponse = { - tag: string - callback: string - k1: string - defaultDescription: string - minWithdrawable: number - maxWithdrawable: number - balanceCheck: string - payLink: string +export type AddAppUserInvoiceRequest = { + receiver_identifier: string + payer_identifier: string + http_callback_url: string + invoice_req: NewInvoiceRequest } -export const LnurlWithdrawInfoResponseOptionalFields: [] = [] -export type LnurlWithdrawInfoResponseOptions = OptionsBaseMessage & { +export const AddAppUserInvoiceRequestOptionalFields: [] = [] +export type AddAppUserInvoiceRequestOptions = OptionsBaseMessage & { checkOptionalsAreSet?: [] - tag_CustomCheck?: (v: string) => boolean - callback_CustomCheck?: (v: string) => boolean - k1_CustomCheck?: (v: string) => boolean - defaultDescription_CustomCheck?: (v: string) => boolean - minWithdrawable_CustomCheck?: (v: number) => boolean - maxWithdrawable_CustomCheck?: (v: number) => boolean - balanceCheck_CustomCheck?: (v: string) => boolean - payLink_CustomCheck?: (v: string) => boolean + receiver_identifier_CustomCheck?: (v: string) => boolean + payer_identifier_CustomCheck?: (v: string) => boolean + http_callback_url_CustomCheck?: (v: string) => boolean + invoice_req_Options?: NewInvoiceRequestOptions } -export const LnurlWithdrawInfoResponseValidate = (o?: LnurlWithdrawInfoResponse, opts: LnurlWithdrawInfoResponseOptions = {}, path: string = 'LnurlWithdrawInfoResponse::root.'): Error | null => { +export const AddAppUserInvoiceRequestValidate = (o?: AddAppUserInvoiceRequest, opts: AddAppUserInvoiceRequestOptions = {}, path: string = 'AddAppUserInvoiceRequest::root.'): Error | null => { if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message') if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null') - if (typeof o.tag !== 'string') return new Error(`${path}.tag: is not a string`) - if (opts.tag_CustomCheck && !opts.tag_CustomCheck(o.tag)) return new Error(`${path}.tag: custom check failed`) - - if (typeof o.callback !== 'string') return new Error(`${path}.callback: is not a string`) - if (opts.callback_CustomCheck && !opts.callback_CustomCheck(o.callback)) return new Error(`${path}.callback: custom check failed`) - - if (typeof o.k1 !== 'string') return new Error(`${path}.k1: is not a string`) - if (opts.k1_CustomCheck && !opts.k1_CustomCheck(o.k1)) return new Error(`${path}.k1: custom check failed`) - - if (typeof o.defaultDescription !== 'string') return new Error(`${path}.defaultDescription: is not a string`) - if (opts.defaultDescription_CustomCheck && !opts.defaultDescription_CustomCheck(o.defaultDescription)) return new Error(`${path}.defaultDescription: custom check failed`) - - if (typeof o.minWithdrawable !== 'number') return new Error(`${path}.minWithdrawable: is not a number`) - if (opts.minWithdrawable_CustomCheck && !opts.minWithdrawable_CustomCheck(o.minWithdrawable)) return new Error(`${path}.minWithdrawable: custom check failed`) + if (typeof o.receiver_identifier !== 'string') return new Error(`${path}.receiver_identifier: is not a string`) + if (opts.receiver_identifier_CustomCheck && !opts.receiver_identifier_CustomCheck(o.receiver_identifier)) return new Error(`${path}.receiver_identifier: custom check failed`) - if (typeof o.maxWithdrawable !== 'number') return new Error(`${path}.maxWithdrawable: is not a number`) - if (opts.maxWithdrawable_CustomCheck && !opts.maxWithdrawable_CustomCheck(o.maxWithdrawable)) return new Error(`${path}.maxWithdrawable: custom check failed`) + if (typeof o.payer_identifier !== 'string') return new Error(`${path}.payer_identifier: is not a string`) + if (opts.payer_identifier_CustomCheck && !opts.payer_identifier_CustomCheck(o.payer_identifier)) return new Error(`${path}.payer_identifier: custom check failed`) - if (typeof o.balanceCheck !== 'string') return new Error(`${path}.balanceCheck: is not a string`) - if (opts.balanceCheck_CustomCheck && !opts.balanceCheck_CustomCheck(o.balanceCheck)) return new Error(`${path}.balanceCheck: custom check failed`) + if (typeof o.http_callback_url !== 'string') return new Error(`${path}.http_callback_url: is not a string`) + if (opts.http_callback_url_CustomCheck && !opts.http_callback_url_CustomCheck(o.http_callback_url)) return new Error(`${path}.http_callback_url: custom check failed`) - if (typeof o.payLink !== 'string') return new Error(`${path}.payLink: is not a string`) - if (opts.payLink_CustomCheck && !opts.payLink_CustomCheck(o.payLink)) return new Error(`${path}.payLink: custom check failed`) + const invoice_reqErr = NewInvoiceRequestValidate(o.invoice_req, opts.invoice_req_Options, `${path}.invoice_req`) + if (invoice_reqErr !== null) return invoice_reqErr + return null } -export type GetUserOperationsRequest = { - latestIncomingInvoice: number - latestOutgoingInvoice: number - latestIncomingTx: number - latestOutgoingTx: number - latestIncomingUserToUserPayment: number - latestOutgoingUserToUserPayment: number - max_size: number +export type DecodeInvoiceRequest = { + invoice: string } -export const GetUserOperationsRequestOptionalFields: [] = [] -export type GetUserOperationsRequestOptions = OptionsBaseMessage & { +export const DecodeInvoiceRequestOptionalFields: [] = [] +export type DecodeInvoiceRequestOptions = OptionsBaseMessage & { checkOptionalsAreSet?: [] - latestIncomingInvoice_CustomCheck?: (v: number) => boolean - latestOutgoingInvoice_CustomCheck?: (v: number) => boolean - latestIncomingTx_CustomCheck?: (v: number) => boolean - latestOutgoingTx_CustomCheck?: (v: number) => boolean - latestIncomingUserToUserPayment_CustomCheck?: (v: number) => boolean - latestOutgoingUserToUserPayment_CustomCheck?: (v: number) => boolean - max_size_CustomCheck?: (v: number) => boolean + invoice_CustomCheck?: (v: string) => boolean } -export const GetUserOperationsRequestValidate = (o?: GetUserOperationsRequest, opts: GetUserOperationsRequestOptions = {}, path: string = 'GetUserOperationsRequest::root.'): Error | null => { +export const DecodeInvoiceRequestValidate = (o?: DecodeInvoiceRequest, opts: DecodeInvoiceRequestOptions = {}, path: string = 'DecodeInvoiceRequest::root.'): Error | null => { if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message') if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null') - if (typeof o.latestIncomingInvoice !== 'number') return new Error(`${path}.latestIncomingInvoice: is not a number`) - if (opts.latestIncomingInvoice_CustomCheck && !opts.latestIncomingInvoice_CustomCheck(o.latestIncomingInvoice)) return new Error(`${path}.latestIncomingInvoice: custom check failed`) - - if (typeof o.latestOutgoingInvoice !== 'number') return new Error(`${path}.latestOutgoingInvoice: is not a number`) - if (opts.latestOutgoingInvoice_CustomCheck && !opts.latestOutgoingInvoice_CustomCheck(o.latestOutgoingInvoice)) return new Error(`${path}.latestOutgoingInvoice: custom check failed`) - - if (typeof o.latestIncomingTx !== 'number') return new Error(`${path}.latestIncomingTx: is not a number`) - if (opts.latestIncomingTx_CustomCheck && !opts.latestIncomingTx_CustomCheck(o.latestIncomingTx)) return new Error(`${path}.latestIncomingTx: custom check failed`) - - if (typeof o.latestOutgoingTx !== 'number') return new Error(`${path}.latestOutgoingTx: is not a number`) - if (opts.latestOutgoingTx_CustomCheck && !opts.latestOutgoingTx_CustomCheck(o.latestOutgoingTx)) return new Error(`${path}.latestOutgoingTx: custom check failed`) - - if (typeof o.latestIncomingUserToUserPayment !== 'number') return new Error(`${path}.latestIncomingUserToUserPayment: is not a number`) - if (opts.latestIncomingUserToUserPayment_CustomCheck && !opts.latestIncomingUserToUserPayment_CustomCheck(o.latestIncomingUserToUserPayment)) return new Error(`${path}.latestIncomingUserToUserPayment: custom check failed`) - - if (typeof o.latestOutgoingUserToUserPayment !== 'number') return new Error(`${path}.latestOutgoingUserToUserPayment: is not a number`) - if (opts.latestOutgoingUserToUserPayment_CustomCheck && !opts.latestOutgoingUserToUserPayment_CustomCheck(o.latestOutgoingUserToUserPayment)) return new Error(`${path}.latestOutgoingUserToUserPayment: custom check failed`) - - if (typeof o.max_size !== 'number') return new Error(`${path}.max_size: is not a number`) - if (opts.max_size_CustomCheck && !opts.max_size_CustomCheck(o.max_size)) return new Error(`${path}.max_size: custom check failed`) + if (typeof o.invoice !== 'string') return new Error(`${path}.invoice: is not a string`) + if (opts.invoice_CustomCheck && !opts.invoice_CustomCheck(o.invoice)) return new Error(`${path}.invoice: custom check failed`) return null } -export type LnurlPayInfoResponse = { - tag: string - callback: string - maxSendable: number - minSendable: number - metadata: string - allowsNostr: boolean - nostrPubkey: string +export type UserInfo = { + userId: string + balance: number + max_withdrawable: number + user_identifier: string + service_fee_bps: number + network_max_fee_bps: number + network_max_fee_fixed: number } -export const LnurlPayInfoResponseOptionalFields: [] = [] -export type LnurlPayInfoResponseOptions = OptionsBaseMessage & { +export const UserInfoOptionalFields: [] = [] +export type UserInfoOptions = OptionsBaseMessage & { checkOptionalsAreSet?: [] - tag_CustomCheck?: (v: string) => boolean - callback_CustomCheck?: (v: string) => boolean - maxSendable_CustomCheck?: (v: number) => boolean - minSendable_CustomCheck?: (v: number) => boolean - metadata_CustomCheck?: (v: string) => boolean - allowsNostr_CustomCheck?: (v: boolean) => boolean - nostrPubkey_CustomCheck?: (v: string) => boolean + userId_CustomCheck?: (v: string) => boolean + balance_CustomCheck?: (v: number) => boolean + max_withdrawable_CustomCheck?: (v: number) => boolean + user_identifier_CustomCheck?: (v: string) => boolean + service_fee_bps_CustomCheck?: (v: number) => boolean + network_max_fee_bps_CustomCheck?: (v: number) => boolean + network_max_fee_fixed_CustomCheck?: (v: number) => boolean } -export const LnurlPayInfoResponseValidate = (o?: LnurlPayInfoResponse, opts: LnurlPayInfoResponseOptions = {}, path: string = 'LnurlPayInfoResponse::root.'): Error | null => { +export const UserInfoValidate = (o?: UserInfo, opts: UserInfoOptions = {}, path: string = 'UserInfo::root.'): Error | null => { if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message') if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null') - if (typeof o.tag !== 'string') return new Error(`${path}.tag: is not a string`) - if (opts.tag_CustomCheck && !opts.tag_CustomCheck(o.tag)) return new Error(`${path}.tag: custom check failed`) + if (typeof o.userId !== 'string') return new Error(`${path}.userId: is not a string`) + if (opts.userId_CustomCheck && !opts.userId_CustomCheck(o.userId)) return new Error(`${path}.userId: custom check failed`) - if (typeof o.callback !== 'string') return new Error(`${path}.callback: is not a string`) - if (opts.callback_CustomCheck && !opts.callback_CustomCheck(o.callback)) return new Error(`${path}.callback: custom check failed`) + if (typeof o.balance !== 'number') return new Error(`${path}.balance: is not a number`) + if (opts.balance_CustomCheck && !opts.balance_CustomCheck(o.balance)) return new Error(`${path}.balance: custom check failed`) - if (typeof o.maxSendable !== 'number') return new Error(`${path}.maxSendable: is not a number`) - if (opts.maxSendable_CustomCheck && !opts.maxSendable_CustomCheck(o.maxSendable)) return new Error(`${path}.maxSendable: custom check failed`) + if (typeof o.max_withdrawable !== 'number') return new Error(`${path}.max_withdrawable: is not a number`) + if (opts.max_withdrawable_CustomCheck && !opts.max_withdrawable_CustomCheck(o.max_withdrawable)) return new Error(`${path}.max_withdrawable: custom check failed`) - if (typeof o.minSendable !== 'number') return new Error(`${path}.minSendable: is not a number`) - if (opts.minSendable_CustomCheck && !opts.minSendable_CustomCheck(o.minSendable)) return new Error(`${path}.minSendable: custom check failed`) + if (typeof o.user_identifier !== 'string') return new Error(`${path}.user_identifier: is not a string`) + if (opts.user_identifier_CustomCheck && !opts.user_identifier_CustomCheck(o.user_identifier)) return new Error(`${path}.user_identifier: custom check failed`) - if (typeof o.metadata !== 'string') return new Error(`${path}.metadata: is not a string`) - if (opts.metadata_CustomCheck && !opts.metadata_CustomCheck(o.metadata)) return new Error(`${path}.metadata: custom check failed`) + if (typeof o.service_fee_bps !== 'number') return new Error(`${path}.service_fee_bps: is not a number`) + if (opts.service_fee_bps_CustomCheck && !opts.service_fee_bps_CustomCheck(o.service_fee_bps)) return new Error(`${path}.service_fee_bps: custom check failed`) - if (typeof o.allowsNostr !== 'boolean') return new Error(`${path}.allowsNostr: is not a boolean`) - if (opts.allowsNostr_CustomCheck && !opts.allowsNostr_CustomCheck(o.allowsNostr)) return new Error(`${path}.allowsNostr: custom check failed`) + if (typeof o.network_max_fee_bps !== 'number') return new Error(`${path}.network_max_fee_bps: is not a number`) + if (opts.network_max_fee_bps_CustomCheck && !opts.network_max_fee_bps_CustomCheck(o.network_max_fee_bps)) return new Error(`${path}.network_max_fee_bps: custom check failed`) - if (typeof o.nostrPubkey !== 'string') return new Error(`${path}.nostrPubkey: is not a string`) - if (opts.nostrPubkey_CustomCheck && !opts.nostrPubkey_CustomCheck(o.nostrPubkey)) return new Error(`${path}.nostrPubkey: custom check failed`) + if (typeof o.network_max_fee_fixed !== 'number') return new Error(`${path}.network_max_fee_fixed: is not a number`) + if (opts.network_max_fee_fixed_CustomCheck && !opts.network_max_fee_fixed_CustomCheck(o.network_max_fee_fixed)) return new Error(`${path}.network_max_fee_fixed: custom check failed`) return null } -export type AddProductRequest = { - name: string - price_sats: number +export type GetUserOperationsResponse = { + latestOutgoingInvoiceOperations: UserOperations + latestIncomingInvoiceOperations: UserOperations + latestOutgoingTxOperations: UserOperations + latestIncomingTxOperations: UserOperations + latestOutgoingUserToUserPayemnts: UserOperations + latestIncomingUserToUserPayemnts: UserOperations } -export const AddProductRequestOptionalFields: [] = [] -export type AddProductRequestOptions = OptionsBaseMessage & { +export const GetUserOperationsResponseOptionalFields: [] = [] +export type GetUserOperationsResponseOptions = OptionsBaseMessage & { checkOptionalsAreSet?: [] - name_CustomCheck?: (v: string) => boolean - price_sats_CustomCheck?: (v: number) => boolean + latestOutgoingInvoiceOperations_Options?: UserOperationsOptions + latestIncomingInvoiceOperations_Options?: UserOperationsOptions + latestOutgoingTxOperations_Options?: UserOperationsOptions + latestIncomingTxOperations_Options?: UserOperationsOptions + latestOutgoingUserToUserPayemnts_Options?: UserOperationsOptions + latestIncomingUserToUserPayemnts_Options?: UserOperationsOptions } -export const AddProductRequestValidate = (o?: AddProductRequest, opts: AddProductRequestOptions = {}, path: string = 'AddProductRequest::root.'): Error | null => { +export const GetUserOperationsResponseValidate = (o?: GetUserOperationsResponse, opts: GetUserOperationsResponseOptions = {}, path: string = 'GetUserOperationsResponse::root.'): Error | null => { if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message') if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null') - if (typeof o.name !== 'string') return new Error(`${path}.name: is not a string`) - if (opts.name_CustomCheck && !opts.name_CustomCheck(o.name)) return new Error(`${path}.name: custom check failed`) + const latestOutgoingInvoiceOperationsErr = UserOperationsValidate(o.latestOutgoingInvoiceOperations, opts.latestOutgoingInvoiceOperations_Options, `${path}.latestOutgoingInvoiceOperations`) + if (latestOutgoingInvoiceOperationsErr !== null) return latestOutgoingInvoiceOperationsErr + - if (typeof o.price_sats !== 'number') return new Error(`${path}.price_sats: is not a number`) - if (opts.price_sats_CustomCheck && !opts.price_sats_CustomCheck(o.price_sats)) return new Error(`${path}.price_sats: custom check failed`) + const latestIncomingInvoiceOperationsErr = UserOperationsValidate(o.latestIncomingInvoiceOperations, opts.latestIncomingInvoiceOperations_Options, `${path}.latestIncomingInvoiceOperations`) + if (latestIncomingInvoiceOperationsErr !== null) return latestIncomingInvoiceOperationsErr + + + const latestOutgoingTxOperationsErr = UserOperationsValidate(o.latestOutgoingTxOperations, opts.latestOutgoingTxOperations_Options, `${path}.latestOutgoingTxOperations`) + if (latestOutgoingTxOperationsErr !== null) return latestOutgoingTxOperationsErr + + + const latestIncomingTxOperationsErr = UserOperationsValidate(o.latestIncomingTxOperations, opts.latestIncomingTxOperations_Options, `${path}.latestIncomingTxOperations`) + if (latestIncomingTxOperationsErr !== null) return latestIncomingTxOperationsErr + + + const latestOutgoingUserToUserPayemntsErr = UserOperationsValidate(o.latestOutgoingUserToUserPayemnts, opts.latestOutgoingUserToUserPayemnts_Options, `${path}.latestOutgoingUserToUserPayemnts`) + if (latestOutgoingUserToUserPayemntsErr !== null) return latestOutgoingUserToUserPayemntsErr + + + const latestIncomingUserToUserPayemntsErr = UserOperationsValidate(o.latestIncomingUserToUserPayemnts, opts.latestIncomingUserToUserPayemnts_Options, `${path}.latestIncomingUserToUserPayemnts`) + if (latestIncomingUserToUserPayemntsErr !== null) return latestIncomingUserToUserPayemntsErr + return null } -export type LinkNPubThroughTokenRequest = { - token: string - nostr_pub: string +export type OpenChannelResponse = { + channelId: string } -export const LinkNPubThroughTokenRequestOptionalFields: [] = [] -export type LinkNPubThroughTokenRequestOptions = OptionsBaseMessage & { +export const OpenChannelResponseOptionalFields: [] = [] +export type OpenChannelResponseOptions = OptionsBaseMessage & { checkOptionalsAreSet?: [] - token_CustomCheck?: (v: string) => boolean - nostr_pub_CustomCheck?: (v: string) => boolean + channelId_CustomCheck?: (v: string) => boolean } -export const LinkNPubThroughTokenRequestValidate = (o?: LinkNPubThroughTokenRequest, opts: LinkNPubThroughTokenRequestOptions = {}, path: string = 'LinkNPubThroughTokenRequest::root.'): Error | null => { +export const OpenChannelResponseValidate = (o?: OpenChannelResponse, opts: OpenChannelResponseOptions = {}, path: string = 'OpenChannelResponse::root.'): Error | null => { if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message') if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null') - if (typeof o.token !== 'string') return new Error(`${path}.token: is not a string`) - if (opts.token_CustomCheck && !opts.token_CustomCheck(o.token)) return new Error(`${path}.token: custom check failed`) - - if (typeof o.nostr_pub !== 'string') return new Error(`${path}.nostr_pub: is not a string`) - if (opts.nostr_pub_CustomCheck && !opts.nostr_pub_CustomCheck(o.nostr_pub)) return new Error(`${path}.nostr_pub: custom check failed`) + if (typeof o.channelId !== 'string') return new Error(`${path}.channelId: is not a string`) + if (opts.channelId_CustomCheck && !opts.channelId_CustomCheck(o.channelId)) return new Error(`${path}.channelId: custom check failed`) return null } -export type EncryptionExchangeRequest = { - publicKey: string - deviceId: string +export type LiveUserOperation = { + operation: UserOperation } -export const EncryptionExchangeRequestOptionalFields: [] = [] -export type EncryptionExchangeRequestOptions = OptionsBaseMessage & { +export const LiveUserOperationOptionalFields: [] = [] +export type LiveUserOperationOptions = OptionsBaseMessage & { checkOptionalsAreSet?: [] - publicKey_CustomCheck?: (v: string) => boolean - deviceId_CustomCheck?: (v: string) => boolean + operation_Options?: UserOperationOptions } -export const EncryptionExchangeRequestValidate = (o?: EncryptionExchangeRequest, opts: EncryptionExchangeRequestOptions = {}, path: string = 'EncryptionExchangeRequest::root.'): Error | null => { +export const LiveUserOperationValidate = (o?: LiveUserOperation, opts: LiveUserOperationOptions = {}, path: string = 'LiveUserOperation::root.'): Error | null => { if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message') if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null') - if (typeof o.publicKey !== 'string') return new Error(`${path}.publicKey: is not a string`) - if (opts.publicKey_CustomCheck && !opts.publicKey_CustomCheck(o.publicKey)) return new Error(`${path}.publicKey: custom check failed`) - - if (typeof o.deviceId !== 'string') return new Error(`${path}.deviceId: is not a string`) - if (opts.deviceId_CustomCheck && !opts.deviceId_CustomCheck(o.deviceId)) return new Error(`${path}.deviceId: custom check failed`) + const operationErr = UserOperationValidate(o.operation, opts.operation_Options, `${path}.operation`) + if (operationErr !== null) return operationErr + return null } -export type ChannelRouting = { - channel_id: string - send_errors: number - receive_errors: number - forward_errors_as_input: number - forward_errors_as_output: number - missed_forward_fee_as_input: number - missed_forward_fee_as_output: number - forward_fee_as_input: number - forward_fee_as_output: number - events_number: number +export type UsageMetrics = { + metrics: UsageMetric[] } -export const ChannelRoutingOptionalFields: [] = [] -export type ChannelRoutingOptions = OptionsBaseMessage & { +export const UsageMetricsOptionalFields: [] = [] +export type UsageMetricsOptions = OptionsBaseMessage & { checkOptionalsAreSet?: [] - channel_id_CustomCheck?: (v: string) => boolean - send_errors_CustomCheck?: (v: number) => boolean - receive_errors_CustomCheck?: (v: number) => boolean - forward_errors_as_input_CustomCheck?: (v: number) => boolean - forward_errors_as_output_CustomCheck?: (v: number) => boolean - missed_forward_fee_as_input_CustomCheck?: (v: number) => boolean - missed_forward_fee_as_output_CustomCheck?: (v: number) => boolean - forward_fee_as_input_CustomCheck?: (v: number) => boolean - forward_fee_as_output_CustomCheck?: (v: number) => boolean - events_number_CustomCheck?: (v: number) => boolean + metrics_ItemOptions?: UsageMetricOptions + metrics_CustomCheck?: (v: UsageMetric[]) => boolean } -export const ChannelRoutingValidate = (o?: ChannelRouting, opts: ChannelRoutingOptions = {}, path: string = 'ChannelRouting::root.'): Error | null => { +export const UsageMetricsValidate = (o?: UsageMetrics, opts: UsageMetricsOptions = {}, path: string = 'UsageMetrics::root.'): Error | null => { if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message') if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null') - if (typeof o.channel_id !== 'string') return new Error(`${path}.channel_id: is not a string`) - if (opts.channel_id_CustomCheck && !opts.channel_id_CustomCheck(o.channel_id)) return new Error(`${path}.channel_id: custom check failed`) - - if (typeof o.send_errors !== 'number') return new Error(`${path}.send_errors: is not a number`) - if (opts.send_errors_CustomCheck && !opts.send_errors_CustomCheck(o.send_errors)) return new Error(`${path}.send_errors: custom check failed`) - - if (typeof o.receive_errors !== 'number') return new Error(`${path}.receive_errors: is not a number`) - if (opts.receive_errors_CustomCheck && !opts.receive_errors_CustomCheck(o.receive_errors)) return new Error(`${path}.receive_errors: custom check failed`) - - if (typeof o.forward_errors_as_input !== 'number') return new Error(`${path}.forward_errors_as_input: is not a number`) - if (opts.forward_errors_as_input_CustomCheck && !opts.forward_errors_as_input_CustomCheck(o.forward_errors_as_input)) return new Error(`${path}.forward_errors_as_input: custom check failed`) - - if (typeof o.forward_errors_as_output !== 'number') return new Error(`${path}.forward_errors_as_output: is not a number`) - if (opts.forward_errors_as_output_CustomCheck && !opts.forward_errors_as_output_CustomCheck(o.forward_errors_as_output)) return new Error(`${path}.forward_errors_as_output: custom check failed`) - - if (typeof o.missed_forward_fee_as_input !== 'number') return new Error(`${path}.missed_forward_fee_as_input: is not a number`) - if (opts.missed_forward_fee_as_input_CustomCheck && !opts.missed_forward_fee_as_input_CustomCheck(o.missed_forward_fee_as_input)) return new Error(`${path}.missed_forward_fee_as_input: custom check failed`) - - if (typeof o.missed_forward_fee_as_output !== 'number') return new Error(`${path}.missed_forward_fee_as_output: is not a number`) - if (opts.missed_forward_fee_as_output_CustomCheck && !opts.missed_forward_fee_as_output_CustomCheck(o.missed_forward_fee_as_output)) return new Error(`${path}.missed_forward_fee_as_output: custom check failed`) - - if (typeof o.forward_fee_as_input !== 'number') return new Error(`${path}.forward_fee_as_input: is not a number`) - if (opts.forward_fee_as_input_CustomCheck && !opts.forward_fee_as_input_CustomCheck(o.forward_fee_as_input)) return new Error(`${path}.forward_fee_as_input: custom check failed`) - - if (typeof o.forward_fee_as_output !== 'number') return new Error(`${path}.forward_fee_as_output: is not a number`) - if (opts.forward_fee_as_output_CustomCheck && !opts.forward_fee_as_output_CustomCheck(o.forward_fee_as_output)) return new Error(`${path}.forward_fee_as_output: custom check failed`) - - if (typeof o.events_number !== 'number') return new Error(`${path}.events_number: is not a number`) - if (opts.events_number_CustomCheck && !opts.events_number_CustomCheck(o.events_number)) return new Error(`${path}.events_number: custom check failed`) + if (!Array.isArray(o.metrics)) return new Error(`${path}.metrics: is not an array`) + for (let index = 0; index < o.metrics.length; index++) { + const metricsErr = UsageMetricValidate(o.metrics[index], opts.metrics_ItemOptions, `${path}.metrics[${index}]`) + if (metricsErr !== null) return metricsErr + } + if (opts.metrics_CustomCheck && !opts.metrics_CustomCheck(o.metrics)) return new Error(`${path}.metrics: custom check failed`) return null } -export type SetMockInvoiceAsPaidRequest = { - invoice: string - amount: number +export type AuthApp = { + app: Application + auth_token: string } -export const SetMockInvoiceAsPaidRequestOptionalFields: [] = [] -export type SetMockInvoiceAsPaidRequestOptions = OptionsBaseMessage & { +export const AuthAppOptionalFields: [] = [] +export type AuthAppOptions = OptionsBaseMessage & { checkOptionalsAreSet?: [] - invoice_CustomCheck?: (v: string) => boolean - amount_CustomCheck?: (v: number) => boolean + app_Options?: ApplicationOptions + auth_token_CustomCheck?: (v: string) => boolean } -export const SetMockInvoiceAsPaidRequestValidate = (o?: SetMockInvoiceAsPaidRequest, opts: SetMockInvoiceAsPaidRequestOptions = {}, path: string = 'SetMockInvoiceAsPaidRequest::root.'): Error | null => { +export const AuthAppValidate = (o?: AuthApp, opts: AuthAppOptions = {}, path: string = 'AuthApp::root.'): Error | null => { if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message') if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null') - if (typeof o.invoice !== 'string') return new Error(`${path}.invoice: is not a string`) - if (opts.invoice_CustomCheck && !opts.invoice_CustomCheck(o.invoice)) return new Error(`${path}.invoice: custom check failed`) + const appErr = ApplicationValidate(o.app, opts.app_Options, `${path}.app`) + if (appErr !== null) return appErr + - if (typeof o.amount !== 'number') return new Error(`${path}.amount: is not a number`) - if (opts.amount_CustomCheck && !opts.amount_CustomCheck(o.amount)) return new Error(`${path}.amount: custom check failed`) + if (typeof o.auth_token !== 'string') return new Error(`${path}.auth_token: is not a string`) + if (opts.auth_token_CustomCheck && !opts.auth_token_CustomCheck(o.auth_token)) return new Error(`${path}.auth_token: custom check failed`) return null } -export type AppUser = { - identifier: string - info: UserInfo - max_withdrawable: number +export type AddAppInvoiceRequest = { + payer_identifier: string + http_callback_url: string + invoice_req: NewInvoiceRequest } -export const AppUserOptionalFields: [] = [] -export type AppUserOptions = OptionsBaseMessage & { +export const AddAppInvoiceRequestOptionalFields: [] = [] +export type AddAppInvoiceRequestOptions = OptionsBaseMessage & { checkOptionalsAreSet?: [] - identifier_CustomCheck?: (v: string) => boolean - info_Options?: UserInfoOptions - max_withdrawable_CustomCheck?: (v: number) => boolean + payer_identifier_CustomCheck?: (v: string) => boolean + http_callback_url_CustomCheck?: (v: string) => boolean + invoice_req_Options?: NewInvoiceRequestOptions } -export const AppUserValidate = (o?: AppUser, opts: AppUserOptions = {}, path: string = 'AppUser::root.'): Error | null => { +export const AddAppInvoiceRequestValidate = (o?: AddAppInvoiceRequest, opts: AddAppInvoiceRequestOptions = {}, path: string = 'AddAppInvoiceRequest::root.'): Error | null => { if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message') if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null') - if (typeof o.identifier !== 'string') return new Error(`${path}.identifier: is not a string`) - if (opts.identifier_CustomCheck && !opts.identifier_CustomCheck(o.identifier)) return new Error(`${path}.identifier: custom check failed`) - - const infoErr = UserInfoValidate(o.info, opts.info_Options, `${path}.info`) - if (infoErr !== null) return infoErr - - - if (typeof o.max_withdrawable !== 'number') return new Error(`${path}.max_withdrawable: is not a number`) - if (opts.max_withdrawable_CustomCheck && !opts.max_withdrawable_CustomCheck(o.max_withdrawable)) return new Error(`${path}.max_withdrawable: custom check failed`) - - return null -} + if (typeof o.payer_identifier !== 'string') return new Error(`${path}.payer_identifier: is not a string`) + if (opts.payer_identifier_CustomCheck && !opts.payer_identifier_CustomCheck(o.payer_identifier)) return new Error(`${path}.payer_identifier: custom check failed`) -export type SetMockAppBalanceRequest = { - amount: number -} -export const SetMockAppBalanceRequestOptionalFields: [] = [] -export type SetMockAppBalanceRequestOptions = OptionsBaseMessage & { - checkOptionalsAreSet?: [] - amount_CustomCheck?: (v: number) => boolean -} -export const SetMockAppBalanceRequestValidate = (o?: SetMockAppBalanceRequest, opts: SetMockAppBalanceRequestOptions = {}, path: string = 'SetMockAppBalanceRequest::root.'): Error | null => { - if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message') - if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null') + if (typeof o.http_callback_url !== 'string') return new Error(`${path}.http_callback_url: is not a string`) + if (opts.http_callback_url_CustomCheck && !opts.http_callback_url_CustomCheck(o.http_callback_url)) return new Error(`${path}.http_callback_url: custom check failed`) - if (typeof o.amount !== 'number') return new Error(`${path}.amount: is not a number`) - if (opts.amount_CustomCheck && !opts.amount_CustomCheck(o.amount)) return new Error(`${path}.amount: custom check failed`) + const invoice_reqErr = NewInvoiceRequestValidate(o.invoice_req, opts.invoice_req_Options, `${path}.invoice_req`) + if (invoice_reqErr !== null) return invoice_reqErr + return null } @@ -1207,55 +1145,6 @@ export const DecodeInvoiceResponseValidate = (o?: DecodeInvoiceResponse, opts: D return null } -export type GetUserOperationsResponse = { - latestOutgoingInvoiceOperations: UserOperations - latestIncomingInvoiceOperations: UserOperations - latestOutgoingTxOperations: UserOperations - latestIncomingTxOperations: UserOperations - latestOutgoingUserToUserPayemnts: UserOperations - latestIncomingUserToUserPayemnts: UserOperations -} -export const GetUserOperationsResponseOptionalFields: [] = [] -export type GetUserOperationsResponseOptions = OptionsBaseMessage & { - checkOptionalsAreSet?: [] - latestOutgoingInvoiceOperations_Options?: UserOperationsOptions - latestIncomingInvoiceOperations_Options?: UserOperationsOptions - latestOutgoingTxOperations_Options?: UserOperationsOptions - latestIncomingTxOperations_Options?: UserOperationsOptions - latestOutgoingUserToUserPayemnts_Options?: UserOperationsOptions - latestIncomingUserToUserPayemnts_Options?: UserOperationsOptions -} -export const GetUserOperationsResponseValidate = (o?: GetUserOperationsResponse, opts: GetUserOperationsResponseOptions = {}, path: string = 'GetUserOperationsResponse::root.'): Error | null => { - if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message') - if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null') - - const latestOutgoingInvoiceOperationsErr = UserOperationsValidate(o.latestOutgoingInvoiceOperations, opts.latestOutgoingInvoiceOperations_Options, `${path}.latestOutgoingInvoiceOperations`) - if (latestOutgoingInvoiceOperationsErr !== null) return latestOutgoingInvoiceOperationsErr - - - const latestIncomingInvoiceOperationsErr = UserOperationsValidate(o.latestIncomingInvoiceOperations, opts.latestIncomingInvoiceOperations_Options, `${path}.latestIncomingInvoiceOperations`) - if (latestIncomingInvoiceOperationsErr !== null) return latestIncomingInvoiceOperationsErr - - - const latestOutgoingTxOperationsErr = UserOperationsValidate(o.latestOutgoingTxOperations, opts.latestOutgoingTxOperations_Options, `${path}.latestOutgoingTxOperations`) - if (latestOutgoingTxOperationsErr !== null) return latestOutgoingTxOperationsErr - - - const latestIncomingTxOperationsErr = UserOperationsValidate(o.latestIncomingTxOperations, opts.latestIncomingTxOperations_Options, `${path}.latestIncomingTxOperations`) - if (latestIncomingTxOperationsErr !== null) return latestIncomingTxOperationsErr - - - const latestOutgoingUserToUserPayemntsErr = UserOperationsValidate(o.latestOutgoingUserToUserPayemnts, opts.latestOutgoingUserToUserPayemnts_Options, `${path}.latestOutgoingUserToUserPayemnts`) - if (latestOutgoingUserToUserPayemntsErr !== null) return latestOutgoingUserToUserPayemntsErr - - - const latestIncomingUserToUserPayemntsErr = UserOperationsValidate(o.latestIncomingUserToUserPayemnts, opts.latestIncomingUserToUserPayemnts_Options, `${path}.latestIncomingUserToUserPayemnts`) - if (latestIncomingUserToUserPayemntsErr !== null) return latestIncomingUserToUserPayemntsErr - - - return null -} - export type Empty = { } export const EmptyOptionalFields: [] = [] @@ -1269,48 +1158,48 @@ export const EmptyValidate = (o?: Empty, opts: EmptyOptions = {}, path: string = return null } -export type ChainBalanceEvent = { +export type ChannelBalanceEvent = { block_height: number - confirmed_balance: number - unconfirmed_balance: number - total_balance: number + channel_id: string + local_balance_sats: number + remote_balance_sats: number } -export const ChainBalanceEventOptionalFields: [] = [] -export type ChainBalanceEventOptions = OptionsBaseMessage & { +export const ChannelBalanceEventOptionalFields: [] = [] +export type ChannelBalanceEventOptions = OptionsBaseMessage & { checkOptionalsAreSet?: [] block_height_CustomCheck?: (v: number) => boolean - confirmed_balance_CustomCheck?: (v: number) => boolean - unconfirmed_balance_CustomCheck?: (v: number) => boolean - total_balance_CustomCheck?: (v: number) => boolean + channel_id_CustomCheck?: (v: string) => boolean + local_balance_sats_CustomCheck?: (v: number) => boolean + remote_balance_sats_CustomCheck?: (v: number) => boolean } -export const ChainBalanceEventValidate = (o?: ChainBalanceEvent, opts: ChainBalanceEventOptions = {}, path: string = 'ChainBalanceEvent::root.'): Error | null => { +export const ChannelBalanceEventValidate = (o?: ChannelBalanceEvent, opts: ChannelBalanceEventOptions = {}, path: string = 'ChannelBalanceEvent::root.'): Error | null => { if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message') if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null') if (typeof o.block_height !== 'number') return new Error(`${path}.block_height: is not a number`) if (opts.block_height_CustomCheck && !opts.block_height_CustomCheck(o.block_height)) return new Error(`${path}.block_height: custom check failed`) - if (typeof o.confirmed_balance !== 'number') return new Error(`${path}.confirmed_balance: is not a number`) - if (opts.confirmed_balance_CustomCheck && !opts.confirmed_balance_CustomCheck(o.confirmed_balance)) return new Error(`${path}.confirmed_balance: custom check failed`) + if (typeof o.channel_id !== 'string') return new Error(`${path}.channel_id: is not a string`) + if (opts.channel_id_CustomCheck && !opts.channel_id_CustomCheck(o.channel_id)) return new Error(`${path}.channel_id: custom check failed`) - if (typeof o.unconfirmed_balance !== 'number') return new Error(`${path}.unconfirmed_balance: is not a number`) - if (opts.unconfirmed_balance_CustomCheck && !opts.unconfirmed_balance_CustomCheck(o.unconfirmed_balance)) return new Error(`${path}.unconfirmed_balance: custom check failed`) + if (typeof o.local_balance_sats !== 'number') return new Error(`${path}.local_balance_sats: is not a number`) + if (opts.local_balance_sats_CustomCheck && !opts.local_balance_sats_CustomCheck(o.local_balance_sats)) return new Error(`${path}.local_balance_sats: custom check failed`) - if (typeof o.total_balance !== 'number') return new Error(`${path}.total_balance: is not a number`) - if (opts.total_balance_CustomCheck && !opts.total_balance_CustomCheck(o.total_balance)) return new Error(`${path}.total_balance: custom check failed`) + if (typeof o.remote_balance_sats !== 'number') return new Error(`${path}.remote_balance_sats: is not a number`) + if (opts.remote_balance_sats_CustomCheck && !opts.remote_balance_sats_CustomCheck(o.remote_balance_sats)) return new Error(`${path}.remote_balance_sats: custom check failed`) return null } -export type RequestNPubLinkingTokenRequest = { +export type GetAppUserRequest = { user_identifier: string } -export const RequestNPubLinkingTokenRequestOptionalFields: [] = [] -export type RequestNPubLinkingTokenRequestOptions = OptionsBaseMessage & { +export const GetAppUserRequestOptionalFields: [] = [] +export type GetAppUserRequestOptions = OptionsBaseMessage & { checkOptionalsAreSet?: [] user_identifier_CustomCheck?: (v: string) => boolean } -export const RequestNPubLinkingTokenRequestValidate = (o?: RequestNPubLinkingTokenRequest, opts: RequestNPubLinkingTokenRequestOptions = {}, path: string = 'RequestNPubLinkingTokenRequest::root.'): Error | null => { +export const GetAppUserRequestValidate = (o?: GetAppUserRequest, opts: GetAppUserRequestOptions = {}, path: string = 'GetAppUserRequest::root.'): Error | null => { if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message') if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null') @@ -1320,284 +1209,164 @@ export const RequestNPubLinkingTokenRequestValidate = (o?: RequestNPubLinkingTok return null } -export type AuthApp = { - app: Application - auth_token: string +export type HandleLnurlPayResponse = { + pr: string + routes: Empty[] } -export const AuthAppOptionalFields: [] = [] -export type AuthAppOptions = OptionsBaseMessage & { +export const HandleLnurlPayResponseOptionalFields: [] = [] +export type HandleLnurlPayResponseOptions = OptionsBaseMessage & { checkOptionalsAreSet?: [] - app_Options?: ApplicationOptions - auth_token_CustomCheck?: (v: string) => boolean + pr_CustomCheck?: (v: string) => boolean + routes_ItemOptions?: EmptyOptions + routes_CustomCheck?: (v: Empty[]) => boolean } -export const AuthAppValidate = (o?: AuthApp, opts: AuthAppOptions = {}, path: string = 'AuthApp::root.'): Error | null => { +export const HandleLnurlPayResponseValidate = (o?: HandleLnurlPayResponse, opts: HandleLnurlPayResponseOptions = {}, path: string = 'HandleLnurlPayResponse::root.'): Error | null => { if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message') if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null') - const appErr = ApplicationValidate(o.app, opts.app_Options, `${path}.app`) - if (appErr !== null) return appErr - + if (typeof o.pr !== 'string') return new Error(`${path}.pr: is not a string`) + if (opts.pr_CustomCheck && !opts.pr_CustomCheck(o.pr)) return new Error(`${path}.pr: custom check failed`) - if (typeof o.auth_token !== 'string') return new Error(`${path}.auth_token: is not a string`) - if (opts.auth_token_CustomCheck && !opts.auth_token_CustomCheck(o.auth_token)) return new Error(`${path}.auth_token: custom check failed`) + if (!Array.isArray(o.routes)) return new Error(`${path}.routes: is not an array`) + for (let index = 0; index < o.routes.length; index++) { + const routesErr = EmptyValidate(o.routes[index], opts.routes_ItemOptions, `${path}.routes[${index}]`) + if (routesErr !== null) return routesErr + } + if (opts.routes_CustomCheck && !opts.routes_CustomCheck(o.routes)) return new Error(`${path}.routes: custom check failed`) return null } -export type OpenChannelRequest = { - destination: string - fundingAmount: number - pushAmount: number - closeAddress: string +export type AppUser = { + identifier: string + info: UserInfo + max_withdrawable: number } -export const OpenChannelRequestOptionalFields: [] = [] -export type OpenChannelRequestOptions = OptionsBaseMessage & { +export const AppUserOptionalFields: [] = [] +export type AppUserOptions = OptionsBaseMessage & { checkOptionalsAreSet?: [] - destination_CustomCheck?: (v: string) => boolean - fundingAmount_CustomCheck?: (v: number) => boolean - pushAmount_CustomCheck?: (v: number) => boolean - closeAddress_CustomCheck?: (v: string) => boolean + identifier_CustomCheck?: (v: string) => boolean + info_Options?: UserInfoOptions + max_withdrawable_CustomCheck?: (v: number) => boolean } -export const OpenChannelRequestValidate = (o?: OpenChannelRequest, opts: OpenChannelRequestOptions = {}, path: string = 'OpenChannelRequest::root.'): Error | null => { +export const AppUserValidate = (o?: AppUser, opts: AppUserOptions = {}, path: string = 'AppUser::root.'): Error | null => { if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message') if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null') - if (typeof o.destination !== 'string') return new Error(`${path}.destination: is not a string`) - if (opts.destination_CustomCheck && !opts.destination_CustomCheck(o.destination)) return new Error(`${path}.destination: custom check failed`) - - if (typeof o.fundingAmount !== 'number') return new Error(`${path}.fundingAmount: is not a number`) - if (opts.fundingAmount_CustomCheck && !opts.fundingAmount_CustomCheck(o.fundingAmount)) return new Error(`${path}.fundingAmount: custom check failed`) + if (typeof o.identifier !== 'string') return new Error(`${path}.identifier: is not a string`) + if (opts.identifier_CustomCheck && !opts.identifier_CustomCheck(o.identifier)) return new Error(`${path}.identifier: custom check failed`) - if (typeof o.pushAmount !== 'number') return new Error(`${path}.pushAmount: is not a number`) - if (opts.pushAmount_CustomCheck && !opts.pushAmount_CustomCheck(o.pushAmount)) return new Error(`${path}.pushAmount: custom check failed`) + const infoErr = UserInfoValidate(o.info, opts.info_Options, `${path}.info`) + if (infoErr !== null) return infoErr + - if (typeof o.closeAddress !== 'string') return new Error(`${path}.closeAddress: is not a string`) - if (opts.closeAddress_CustomCheck && !opts.closeAddress_CustomCheck(o.closeAddress)) return new Error(`${path}.closeAddress: custom check failed`) + if (typeof o.max_withdrawable !== 'number') return new Error(`${path}.max_withdrawable: is not a number`) + if (opts.max_withdrawable_CustomCheck && !opts.max_withdrawable_CustomCheck(o.max_withdrawable)) return new Error(`${path}.max_withdrawable: custom check failed`) return null } -export type AddAppInvoiceRequest = { - payer_identifier: string - http_callback_url: string - invoice_req: NewInvoiceRequest +export type GetAppUserLNURLInfoRequest = { + user_identifier: string + base_url_override: string } -export const AddAppInvoiceRequestOptionalFields: [] = [] -export type AddAppInvoiceRequestOptions = OptionsBaseMessage & { +export const GetAppUserLNURLInfoRequestOptionalFields: [] = [] +export type GetAppUserLNURLInfoRequestOptions = OptionsBaseMessage & { checkOptionalsAreSet?: [] - payer_identifier_CustomCheck?: (v: string) => boolean - http_callback_url_CustomCheck?: (v: string) => boolean - invoice_req_Options?: NewInvoiceRequestOptions + user_identifier_CustomCheck?: (v: string) => boolean + base_url_override_CustomCheck?: (v: string) => boolean } -export const AddAppInvoiceRequestValidate = (o?: AddAppInvoiceRequest, opts: AddAppInvoiceRequestOptions = {}, path: string = 'AddAppInvoiceRequest::root.'): Error | null => { +export const GetAppUserLNURLInfoRequestValidate = (o?: GetAppUserLNURLInfoRequest, opts: GetAppUserLNURLInfoRequestOptions = {}, path: string = 'GetAppUserLNURLInfoRequest::root.'): Error | null => { if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message') if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null') - if (typeof o.payer_identifier !== 'string') return new Error(`${path}.payer_identifier: is not a string`) - if (opts.payer_identifier_CustomCheck && !opts.payer_identifier_CustomCheck(o.payer_identifier)) return new Error(`${path}.payer_identifier: custom check failed`) - - if (typeof o.http_callback_url !== 'string') return new Error(`${path}.http_callback_url: is not a string`) - if (opts.http_callback_url_CustomCheck && !opts.http_callback_url_CustomCheck(o.http_callback_url)) return new Error(`${path}.http_callback_url: custom check failed`) + if (typeof o.user_identifier !== 'string') return new Error(`${path}.user_identifier: is not a string`) + if (opts.user_identifier_CustomCheck && !opts.user_identifier_CustomCheck(o.user_identifier)) return new Error(`${path}.user_identifier: custom check failed`) - const invoice_reqErr = NewInvoiceRequestValidate(o.invoice_req, opts.invoice_req_Options, `${path}.invoice_req`) - if (invoice_reqErr !== null) return invoice_reqErr - + if (typeof o.base_url_override !== 'string') return new Error(`${path}.base_url_override: is not a string`) + if (opts.base_url_override_CustomCheck && !opts.base_url_override_CustomCheck(o.base_url_override)) return new Error(`${path}.base_url_override: custom check failed`) return null } -export type LnurlLinkResponse = { - lnurl: string - k1: string +export type SetMockAppBalanceRequest = { + amount: number } -export const LnurlLinkResponseOptionalFields: [] = [] -export type LnurlLinkResponseOptions = OptionsBaseMessage & { +export const SetMockAppBalanceRequestOptionalFields: [] = [] +export type SetMockAppBalanceRequestOptions = OptionsBaseMessage & { checkOptionalsAreSet?: [] - lnurl_CustomCheck?: (v: string) => boolean - k1_CustomCheck?: (v: string) => boolean -} -export const LnurlLinkResponseValidate = (o?: LnurlLinkResponse, opts: LnurlLinkResponseOptions = {}, path: string = 'LnurlLinkResponse::root.'): Error | null => { - if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message') - if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null') - - if (typeof o.lnurl !== 'string') return new Error(`${path}.lnurl: is not a string`) - if (opts.lnurl_CustomCheck && !opts.lnurl_CustomCheck(o.lnurl)) return new Error(`${path}.lnurl: custom check failed`) - - if (typeof o.k1 !== 'string') return new Error(`${path}.k1: is not a string`) - if (opts.k1_CustomCheck && !opts.k1_CustomCheck(o.k1)) return new Error(`${path}.k1: custom check failed`) - - return null -} - -export type BannedAppUser = { - app_name: string - app_id: string - user_identifier: string - nostr_pub: string -} -export const BannedAppUserOptionalFields: [] = [] -export type BannedAppUserOptions = OptionsBaseMessage & { - checkOptionalsAreSet?: [] - app_name_CustomCheck?: (v: string) => boolean - app_id_CustomCheck?: (v: string) => boolean - user_identifier_CustomCheck?: (v: string) => boolean - nostr_pub_CustomCheck?: (v: string) => boolean + amount_CustomCheck?: (v: number) => boolean } -export const BannedAppUserValidate = (o?: BannedAppUser, opts: BannedAppUserOptions = {}, path: string = 'BannedAppUser::root.'): Error | null => { +export const SetMockAppBalanceRequestValidate = (o?: SetMockAppBalanceRequest, opts: SetMockAppBalanceRequestOptions = {}, path: string = 'SetMockAppBalanceRequest::root.'): Error | null => { if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message') if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null') - if (typeof o.app_name !== 'string') return new Error(`${path}.app_name: is not a string`) - if (opts.app_name_CustomCheck && !opts.app_name_CustomCheck(o.app_name)) return new Error(`${path}.app_name: custom check failed`) - - if (typeof o.app_id !== 'string') return new Error(`${path}.app_id: is not a string`) - if (opts.app_id_CustomCheck && !opts.app_id_CustomCheck(o.app_id)) return new Error(`${path}.app_id: custom check failed`) - - if (typeof o.user_identifier !== 'string') return new Error(`${path}.user_identifier: is not a string`) - if (opts.user_identifier_CustomCheck && !opts.user_identifier_CustomCheck(o.user_identifier)) return new Error(`${path}.user_identifier: custom check failed`) - - if (typeof o.nostr_pub !== 'string') return new Error(`${path}.nostr_pub: is not a string`) - if (opts.nostr_pub_CustomCheck && !opts.nostr_pub_CustomCheck(o.nostr_pub)) return new Error(`${path}.nostr_pub: custom check failed`) + if (typeof o.amount !== 'number') return new Error(`${path}.amount: is not a number`) + if (opts.amount_CustomCheck && !opts.amount_CustomCheck(o.amount)) return new Error(`${path}.amount: custom check failed`) return null } -export type Application = { +export type AddProductRequest = { name: string - id: string - balance: number - npub: string + price_sats: number } -export const ApplicationOptionalFields: [] = [] -export type ApplicationOptions = OptionsBaseMessage & { +export const AddProductRequestOptionalFields: [] = [] +export type AddProductRequestOptions = OptionsBaseMessage & { checkOptionalsAreSet?: [] name_CustomCheck?: (v: string) => boolean - id_CustomCheck?: (v: string) => boolean - balance_CustomCheck?: (v: number) => boolean - npub_CustomCheck?: (v: string) => boolean + price_sats_CustomCheck?: (v: number) => boolean } -export const ApplicationValidate = (o?: Application, opts: ApplicationOptions = {}, path: string = 'Application::root.'): Error | null => { +export const AddProductRequestValidate = (o?: AddProductRequest, opts: AddProductRequestOptions = {}, path: string = 'AddProductRequest::root.'): Error | null => { if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message') if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null') if (typeof o.name !== 'string') return new Error(`${path}.name: is not a string`) if (opts.name_CustomCheck && !opts.name_CustomCheck(o.name)) return new Error(`${path}.name: custom check failed`) - if (typeof o.id !== 'string') return new Error(`${path}.id: is not a string`) - if (opts.id_CustomCheck && !opts.id_CustomCheck(o.id)) return new Error(`${path}.id: custom check failed`) - - if (typeof o.balance !== 'number') return new Error(`${path}.balance: is not a number`) - if (opts.balance_CustomCheck && !opts.balance_CustomCheck(o.balance)) return new Error(`${path}.balance: custom check failed`) - - if (typeof o.npub !== 'string') return new Error(`${path}.npub: is not a string`) - if (opts.npub_CustomCheck && !opts.npub_CustomCheck(o.npub)) return new Error(`${path}.npub: custom check failed`) - - return null -} - -export type SetMockAppUserBalanceRequest = { - user_identifier: string - amount: number -} -export const SetMockAppUserBalanceRequestOptionalFields: [] = [] -export type SetMockAppUserBalanceRequestOptions = OptionsBaseMessage & { - checkOptionalsAreSet?: [] - user_identifier_CustomCheck?: (v: string) => boolean - amount_CustomCheck?: (v: number) => boolean -} -export const SetMockAppUserBalanceRequestValidate = (o?: SetMockAppUserBalanceRequest, opts: SetMockAppUserBalanceRequestOptions = {}, path: string = 'SetMockAppUserBalanceRequest::root.'): Error | null => { - if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message') - if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null') - - if (typeof o.user_identifier !== 'string') return new Error(`${path}.user_identifier: is not a string`) - if (opts.user_identifier_CustomCheck && !opts.user_identifier_CustomCheck(o.user_identifier)) return new Error(`${path}.user_identifier: custom check failed`) - - if (typeof o.amount !== 'number') return new Error(`${path}.amount: is not a number`) - if (opts.amount_CustomCheck && !opts.amount_CustomCheck(o.amount)) return new Error(`${path}.amount: custom check failed`) + if (typeof o.price_sats !== 'number') return new Error(`${path}.price_sats: is not a number`) + if (opts.price_sats_CustomCheck && !opts.price_sats_CustomCheck(o.price_sats)) return new Error(`${path}.price_sats: custom check failed`) return null } -export type PayAddressRequest = { - address: string - amoutSats: number - satsPerVByte: number +export type GetProductBuyLinkResponse = { + link: string } -export const PayAddressRequestOptionalFields: [] = [] -export type PayAddressRequestOptions = OptionsBaseMessage & { +export const GetProductBuyLinkResponseOptionalFields: [] = [] +export type GetProductBuyLinkResponseOptions = OptionsBaseMessage & { checkOptionalsAreSet?: [] - address_CustomCheck?: (v: string) => boolean - amoutSats_CustomCheck?: (v: number) => boolean - satsPerVByte_CustomCheck?: (v: number) => boolean + link_CustomCheck?: (v: string) => boolean } -export const PayAddressRequestValidate = (o?: PayAddressRequest, opts: PayAddressRequestOptions = {}, path: string = 'PayAddressRequest::root.'): Error | null => { +export const GetProductBuyLinkResponseValidate = (o?: GetProductBuyLinkResponse, opts: GetProductBuyLinkResponseOptions = {}, path: string = 'GetProductBuyLinkResponse::root.'): Error | null => { if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message') if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null') - if (typeof o.address !== 'string') return new Error(`${path}.address: is not a string`) - if (opts.address_CustomCheck && !opts.address_CustomCheck(o.address)) return new Error(`${path}.address: custom check failed`) - - if (typeof o.amoutSats !== 'number') return new Error(`${path}.amoutSats: is not a number`) - if (opts.amoutSats_CustomCheck && !opts.amoutSats_CustomCheck(o.amoutSats)) return new Error(`${path}.amoutSats: custom check failed`) - - if (typeof o.satsPerVByte !== 'number') return new Error(`${path}.satsPerVByte: is not a number`) - if (opts.satsPerVByte_CustomCheck && !opts.satsPerVByte_CustomCheck(o.satsPerVByte)) return new Error(`${path}.satsPerVByte: custom check failed`) + if (typeof o.link !== 'string') return new Error(`${path}.link: is not a string`) + if (opts.link_CustomCheck && !opts.link_CustomCheck(o.link)) return new Error(`${path}.link: custom check failed`) return null } -export type UserOperations = { - fromIndex: number - toIndex: number - operations: UserOperation[] +export type HttpCreds = { + url: string + token: string } -export const UserOperationsOptionalFields: [] = [] -export type UserOperationsOptions = OptionsBaseMessage & { +export const HttpCredsOptionalFields: [] = [] +export type HttpCredsOptions = OptionsBaseMessage & { checkOptionalsAreSet?: [] - fromIndex_CustomCheck?: (v: number) => boolean - toIndex_CustomCheck?: (v: number) => boolean - operations_ItemOptions?: UserOperationOptions - operations_CustomCheck?: (v: UserOperation[]) => boolean + url_CustomCheck?: (v: string) => boolean + token_CustomCheck?: (v: string) => boolean } -export const UserOperationsValidate = (o?: UserOperations, opts: UserOperationsOptions = {}, path: string = 'UserOperations::root.'): Error | null => { +export const HttpCredsValidate = (o?: HttpCreds, opts: HttpCredsOptions = {}, path: string = 'HttpCreds::root.'): Error | null => { if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message') if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null') - if (typeof o.fromIndex !== 'number') return new Error(`${path}.fromIndex: is not a number`) - if (opts.fromIndex_CustomCheck && !opts.fromIndex_CustomCheck(o.fromIndex)) return new Error(`${path}.fromIndex: custom check failed`) - - if (typeof o.toIndex !== 'number') return new Error(`${path}.toIndex: is not a number`) - if (opts.toIndex_CustomCheck && !opts.toIndex_CustomCheck(o.toIndex)) return new Error(`${path}.toIndex: custom check failed`) - - if (!Array.isArray(o.operations)) return new Error(`${path}.operations: is not an array`) - for (let index = 0; index < o.operations.length; index++) { - const operationsErr = UserOperationValidate(o.operations[index], opts.operations_ItemOptions, `${path}.operations[${index}]`) - if (operationsErr !== null) return operationsErr - } - if (opts.operations_CustomCheck && !opts.operations_CustomCheck(o.operations)) return new Error(`${path}.operations: custom check failed`) - - return null -} - -export type UsageMetrics = { - metrics: UsageMetric[] -} -export const UsageMetricsOptionalFields: [] = [] -export type UsageMetricsOptions = OptionsBaseMessage & { - checkOptionalsAreSet?: [] - metrics_ItemOptions?: UsageMetricOptions - metrics_CustomCheck?: (v: UsageMetric[]) => boolean -} -export const UsageMetricsValidate = (o?: UsageMetrics, opts: UsageMetricsOptions = {}, path: string = 'UsageMetrics::root.'): Error | null => { - if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message') - if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null') + if (typeof o.url !== 'string') return new Error(`${path}.url: is not a string`) + if (opts.url_CustomCheck && !opts.url_CustomCheck(o.url)) return new Error(`${path}.url: custom check failed`) - if (!Array.isArray(o.metrics)) return new Error(`${path}.metrics: is not an array`) - for (let index = 0; index < o.metrics.length; index++) { - const metricsErr = UsageMetricValidate(o.metrics[index], opts.metrics_ItemOptions, `${path}.metrics[${index}]`) - if (metricsErr !== null) return metricsErr - } - if (opts.metrics_CustomCheck && !opts.metrics_CustomCheck(o.metrics)) return new Error(`${path}.metrics: custom check failed`) + if (typeof o.token !== 'string') return new Error(`${path}.token: is not a string`) + if (opts.token_CustomCheck && !opts.token_CustomCheck(o.token)) return new Error(`${path}.token: custom check failed`) return null } @@ -1667,17 +1436,50 @@ export const AppMetricsValidate = (o?: AppMetrics, opts: AppMetricsOptions = {}, return null } -export type PayInvoiceRequest = { +export type ChainBalanceEvent = { + block_height: number + confirmed_balance: number + unconfirmed_balance: number + total_balance: number +} +export const ChainBalanceEventOptionalFields: [] = [] +export type ChainBalanceEventOptions = OptionsBaseMessage & { + checkOptionalsAreSet?: [] + block_height_CustomCheck?: (v: number) => boolean + confirmed_balance_CustomCheck?: (v: number) => boolean + unconfirmed_balance_CustomCheck?: (v: number) => boolean + total_balance_CustomCheck?: (v: number) => boolean +} +export const ChainBalanceEventValidate = (o?: ChainBalanceEvent, opts: ChainBalanceEventOptions = {}, path: string = 'ChainBalanceEvent::root.'): Error | null => { + if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message') + if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null') + + if (typeof o.block_height !== 'number') return new Error(`${path}.block_height: is not a number`) + if (opts.block_height_CustomCheck && !opts.block_height_CustomCheck(o.block_height)) return new Error(`${path}.block_height: custom check failed`) + + if (typeof o.confirmed_balance !== 'number') return new Error(`${path}.confirmed_balance: is not a number`) + if (opts.confirmed_balance_CustomCheck && !opts.confirmed_balance_CustomCheck(o.confirmed_balance)) return new Error(`${path}.confirmed_balance: custom check failed`) + + if (typeof o.unconfirmed_balance !== 'number') return new Error(`${path}.unconfirmed_balance: is not a number`) + if (opts.unconfirmed_balance_CustomCheck && !opts.unconfirmed_balance_CustomCheck(o.unconfirmed_balance)) return new Error(`${path}.unconfirmed_balance: custom check failed`) + + if (typeof o.total_balance !== 'number') return new Error(`${path}.total_balance: is not a number`) + if (opts.total_balance_CustomCheck && !opts.total_balance_CustomCheck(o.total_balance)) return new Error(`${path}.total_balance: custom check failed`) + + return null +} + +export type SetMockInvoiceAsPaidRequest = { invoice: string amount: number } -export const PayInvoiceRequestOptionalFields: [] = [] -export type PayInvoiceRequestOptions = OptionsBaseMessage & { +export const SetMockInvoiceAsPaidRequestOptionalFields: [] = [] +export type SetMockInvoiceAsPaidRequestOptions = OptionsBaseMessage & { checkOptionalsAreSet?: [] invoice_CustomCheck?: (v: string) => boolean amount_CustomCheck?: (v: number) => boolean } -export const PayInvoiceRequestValidate = (o?: PayInvoiceRequest, opts: PayInvoiceRequestOptions = {}, path: string = 'PayInvoiceRequest::root.'): Error | null => { +export const SetMockInvoiceAsPaidRequestValidate = (o?: SetMockInvoiceAsPaidRequest, opts: SetMockInvoiceAsPaidRequestOptions = {}, path: string = 'SetMockInvoiceAsPaidRequest::root.'): Error | null => { if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message') if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null') @@ -1690,245 +1492,186 @@ export const PayInvoiceRequestValidate = (o?: PayInvoiceRequest, opts: PayInvoic return null } -export type RelaysMigration = { - relays: string[] +export type NewAddressRequest = { + addressType: AddressType } -export const RelaysMigrationOptionalFields: [] = [] -export type RelaysMigrationOptions = OptionsBaseMessage & { +export const NewAddressRequestOptionalFields: [] = [] +export type NewAddressRequestOptions = OptionsBaseMessage & { checkOptionalsAreSet?: [] - relays_CustomCheck?: (v: string[]) => boolean + addressType_CustomCheck?: (v: AddressType) => boolean } -export const RelaysMigrationValidate = (o?: RelaysMigration, opts: RelaysMigrationOptions = {}, path: string = 'RelaysMigration::root.'): Error | null => { +export const NewAddressRequestValidate = (o?: NewAddressRequest, opts: NewAddressRequestOptions = {}, path: string = 'NewAddressRequest::root.'): Error | null => { if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message') if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null') - if (!Array.isArray(o.relays)) return new Error(`${path}.relays: is not an array`) - for (let index = 0; index < o.relays.length; index++) { - if (typeof o.relays[index] !== 'string') return new Error(`${path}.relays[${index}]: is not a string`) - } - if (opts.relays_CustomCheck && !opts.relays_CustomCheck(o.relays)) return new Error(`${path}.relays: custom check failed`) + if (!enumCheckAddressType(o.addressType)) return new Error(`${path}.addressType: is not a valid AddressType`) + if (opts.addressType_CustomCheck && !opts.addressType_CustomCheck(o.addressType)) return new Error(`${path}.addressType: custom check failed`) return null } -export type RoutingEvent = { - incoming_channel_id: number - incoming_htlc_id: number - outgoing_channel_id: number - outgoing_htlc_id: number - timestamp_ns: number - event_type: string - incoming_amt_msat: number - outgoing_amt_msat: number - failure_string: string - settled: boolean - offchain: boolean - forward_fail_event: boolean +export type LndGetInfoRequest = { + nodeId: number } -export const RoutingEventOptionalFields: [] = [] -export type RoutingEventOptions = OptionsBaseMessage & { +export const LndGetInfoRequestOptionalFields: [] = [] +export type LndGetInfoRequestOptions = OptionsBaseMessage & { checkOptionalsAreSet?: [] - incoming_channel_id_CustomCheck?: (v: number) => boolean - incoming_htlc_id_CustomCheck?: (v: number) => boolean - outgoing_channel_id_CustomCheck?: (v: number) => boolean - outgoing_htlc_id_CustomCheck?: (v: number) => boolean - timestamp_ns_CustomCheck?: (v: number) => boolean - event_type_CustomCheck?: (v: string) => boolean - incoming_amt_msat_CustomCheck?: (v: number) => boolean - outgoing_amt_msat_CustomCheck?: (v: number) => boolean - failure_string_CustomCheck?: (v: string) => boolean - settled_CustomCheck?: (v: boolean) => boolean - offchain_CustomCheck?: (v: boolean) => boolean - forward_fail_event_CustomCheck?: (v: boolean) => boolean + nodeId_CustomCheck?: (v: number) => boolean } -export const RoutingEventValidate = (o?: RoutingEvent, opts: RoutingEventOptions = {}, path: string = 'RoutingEvent::root.'): Error | null => { +export const LndGetInfoRequestValidate = (o?: LndGetInfoRequest, opts: LndGetInfoRequestOptions = {}, path: string = 'LndGetInfoRequest::root.'): Error | null => { if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message') if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null') - if (typeof o.incoming_channel_id !== 'number') return new Error(`${path}.incoming_channel_id: is not a number`) - if (opts.incoming_channel_id_CustomCheck && !opts.incoming_channel_id_CustomCheck(o.incoming_channel_id)) return new Error(`${path}.incoming_channel_id: custom check failed`) - - if (typeof o.incoming_htlc_id !== 'number') return new Error(`${path}.incoming_htlc_id: is not a number`) - if (opts.incoming_htlc_id_CustomCheck && !opts.incoming_htlc_id_CustomCheck(o.incoming_htlc_id)) return new Error(`${path}.incoming_htlc_id: custom check failed`) - - if (typeof o.outgoing_channel_id !== 'number') return new Error(`${path}.outgoing_channel_id: is not a number`) - if (opts.outgoing_channel_id_CustomCheck && !opts.outgoing_channel_id_CustomCheck(o.outgoing_channel_id)) return new Error(`${path}.outgoing_channel_id: custom check failed`) - - if (typeof o.outgoing_htlc_id !== 'number') return new Error(`${path}.outgoing_htlc_id: is not a number`) - if (opts.outgoing_htlc_id_CustomCheck && !opts.outgoing_htlc_id_CustomCheck(o.outgoing_htlc_id)) return new Error(`${path}.outgoing_htlc_id: custom check failed`) - - if (typeof o.timestamp_ns !== 'number') return new Error(`${path}.timestamp_ns: is not a number`) - if (opts.timestamp_ns_CustomCheck && !opts.timestamp_ns_CustomCheck(o.timestamp_ns)) return new Error(`${path}.timestamp_ns: custom check failed`) - - if (typeof o.event_type !== 'string') return new Error(`${path}.event_type: is not a string`) - if (opts.event_type_CustomCheck && !opts.event_type_CustomCheck(o.event_type)) return new Error(`${path}.event_type: custom check failed`) - - if (typeof o.incoming_amt_msat !== 'number') return new Error(`${path}.incoming_amt_msat: is not a number`) - if (opts.incoming_amt_msat_CustomCheck && !opts.incoming_amt_msat_CustomCheck(o.incoming_amt_msat)) return new Error(`${path}.incoming_amt_msat: custom check failed`) - - if (typeof o.outgoing_amt_msat !== 'number') return new Error(`${path}.outgoing_amt_msat: is not a number`) - if (opts.outgoing_amt_msat_CustomCheck && !opts.outgoing_amt_msat_CustomCheck(o.outgoing_amt_msat)) return new Error(`${path}.outgoing_amt_msat: custom check failed`) - - if (typeof o.failure_string !== 'string') return new Error(`${path}.failure_string: is not a string`) - if (opts.failure_string_CustomCheck && !opts.failure_string_CustomCheck(o.failure_string)) return new Error(`${path}.failure_string: custom check failed`) - - if (typeof o.settled !== 'boolean') return new Error(`${path}.settled: is not a boolean`) - if (opts.settled_CustomCheck && !opts.settled_CustomCheck(o.settled)) return new Error(`${path}.settled: custom check failed`) - - if (typeof o.offchain !== 'boolean') return new Error(`${path}.offchain: is not a boolean`) - if (opts.offchain_CustomCheck && !opts.offchain_CustomCheck(o.offchain)) return new Error(`${path}.offchain: custom check failed`) - - if (typeof o.forward_fail_event !== 'boolean') return new Error(`${path}.forward_fail_event: is not a boolean`) - if (opts.forward_fail_event_CustomCheck && !opts.forward_fail_event_CustomCheck(o.forward_fail_event)) return new Error(`${path}.forward_fail_event: custom check failed`) + if (typeof o.nodeId !== 'number') return new Error(`${path}.nodeId: is not a number`) + if (opts.nodeId_CustomCheck && !opts.nodeId_CustomCheck(o.nodeId)) return new Error(`${path}.nodeId: custom check failed`) return null } -export type LndGetInfoResponse = { - alias: string +export type NewAddressResponse = { + address: string } -export const LndGetInfoResponseOptionalFields: [] = [] -export type LndGetInfoResponseOptions = OptionsBaseMessage & { +export const NewAddressResponseOptionalFields: [] = [] +export type NewAddressResponseOptions = OptionsBaseMessage & { checkOptionalsAreSet?: [] - alias_CustomCheck?: (v: string) => boolean + address_CustomCheck?: (v: string) => boolean } -export const LndGetInfoResponseValidate = (o?: LndGetInfoResponse, opts: LndGetInfoResponseOptions = {}, path: string = 'LndGetInfoResponse::root.'): Error | null => { +export const NewAddressResponseValidate = (o?: NewAddressResponse, opts: NewAddressResponseOptions = {}, path: string = 'NewAddressResponse::root.'): Error | null => { if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message') if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null') - if (typeof o.alias !== 'string') return new Error(`${path}.alias: is not a string`) - if (opts.alias_CustomCheck && !opts.alias_CustomCheck(o.alias)) return new Error(`${path}.alias: custom check failed`) + if (typeof o.address !== 'string') return new Error(`${path}.address: is not a string`) + if (opts.address_CustomCheck && !opts.address_CustomCheck(o.address)) return new Error(`${path}.address: custom check failed`) return null } -export type DecodeInvoiceRequest = { - invoice: string +export type AppsMetrics = { + apps: AppMetrics[] } -export const DecodeInvoiceRequestOptionalFields: [] = [] -export type DecodeInvoiceRequestOptions = OptionsBaseMessage & { +export const AppsMetricsOptionalFields: [] = [] +export type AppsMetricsOptions = OptionsBaseMessage & { checkOptionalsAreSet?: [] - invoice_CustomCheck?: (v: string) => boolean + apps_ItemOptions?: AppMetricsOptions + apps_CustomCheck?: (v: AppMetrics[]) => boolean } -export const DecodeInvoiceRequestValidate = (o?: DecodeInvoiceRequest, opts: DecodeInvoiceRequestOptions = {}, path: string = 'DecodeInvoiceRequest::root.'): Error | null => { +export const AppsMetricsValidate = (o?: AppsMetrics, opts: AppsMetricsOptions = {}, path: string = 'AppsMetrics::root.'): Error | null => { if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message') if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null') - if (typeof o.invoice !== 'string') return new Error(`${path}.invoice: is not a string`) - if (opts.invoice_CustomCheck && !opts.invoice_CustomCheck(o.invoice)) return new Error(`${path}.invoice: custom check failed`) + if (!Array.isArray(o.apps)) return new Error(`${path}.apps: is not an array`) + for (let index = 0; index < o.apps.length; index++) { + const appsErr = AppMetricsValidate(o.apps[index], opts.apps_ItemOptions, `${path}.apps[${index}]`) + if (appsErr !== null) return appsErr + } + if (opts.apps_CustomCheck && !opts.apps_CustomCheck(o.apps)) return new Error(`${path}.apps: custom check failed`) return null } -export type UsersInfo = { - total: number - no_balance: number - negative_balance: number - always_been_inactive: number - balance_avg: number - balance_median: number +export type LndNodeMetrics = { + channels_balance_events: ChannelBalanceEvent[] + chain_balance_events: ChainBalanceEvent[] + offline_channels: number + online_channels: number + pending_channels: number + closing_channels: number + open_channels: OpenChannel[] + closed_channels: ClosedChannel[] + channel_routing: ChannelRouting[] } -export const UsersInfoOptionalFields: [] = [] -export type UsersInfoOptions = OptionsBaseMessage & { +export const LndNodeMetricsOptionalFields: [] = [] +export type LndNodeMetricsOptions = OptionsBaseMessage & { checkOptionalsAreSet?: [] - total_CustomCheck?: (v: number) => boolean - no_balance_CustomCheck?: (v: number) => boolean - negative_balance_CustomCheck?: (v: number) => boolean - always_been_inactive_CustomCheck?: (v: number) => boolean - balance_avg_CustomCheck?: (v: number) => boolean - balance_median_CustomCheck?: (v: number) => boolean + channels_balance_events_ItemOptions?: ChannelBalanceEventOptions + channels_balance_events_CustomCheck?: (v: ChannelBalanceEvent[]) => boolean + chain_balance_events_ItemOptions?: ChainBalanceEventOptions + chain_balance_events_CustomCheck?: (v: ChainBalanceEvent[]) => boolean + offline_channels_CustomCheck?: (v: number) => boolean + online_channels_CustomCheck?: (v: number) => boolean + pending_channels_CustomCheck?: (v: number) => boolean + closing_channels_CustomCheck?: (v: number) => boolean + open_channels_ItemOptions?: OpenChannelOptions + open_channels_CustomCheck?: (v: OpenChannel[]) => boolean + closed_channels_ItemOptions?: ClosedChannelOptions + closed_channels_CustomCheck?: (v: ClosedChannel[]) => boolean + channel_routing_ItemOptions?: ChannelRoutingOptions + channel_routing_CustomCheck?: (v: ChannelRouting[]) => boolean } -export const UsersInfoValidate = (o?: UsersInfo, opts: UsersInfoOptions = {}, path: string = 'UsersInfo::root.'): Error | null => { +export const LndNodeMetricsValidate = (o?: LndNodeMetrics, opts: LndNodeMetricsOptions = {}, path: string = 'LndNodeMetrics::root.'): Error | null => { if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message') if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null') - if (typeof o.total !== 'number') return new Error(`${path}.total: is not a number`) - if (opts.total_CustomCheck && !opts.total_CustomCheck(o.total)) return new Error(`${path}.total: custom check failed`) + if (!Array.isArray(o.channels_balance_events)) return new Error(`${path}.channels_balance_events: is not an array`) + for (let index = 0; index < o.channels_balance_events.length; index++) { + const channels_balance_eventsErr = ChannelBalanceEventValidate(o.channels_balance_events[index], opts.channels_balance_events_ItemOptions, `${path}.channels_balance_events[${index}]`) + if (channels_balance_eventsErr !== null) return channels_balance_eventsErr + } + if (opts.channels_balance_events_CustomCheck && !opts.channels_balance_events_CustomCheck(o.channels_balance_events)) return new Error(`${path}.channels_balance_events: custom check failed`) - if (typeof o.no_balance !== 'number') return new Error(`${path}.no_balance: is not a number`) - if (opts.no_balance_CustomCheck && !opts.no_balance_CustomCheck(o.no_balance)) return new Error(`${path}.no_balance: custom check failed`) + if (!Array.isArray(o.chain_balance_events)) return new Error(`${path}.chain_balance_events: is not an array`) + for (let index = 0; index < o.chain_balance_events.length; index++) { + const chain_balance_eventsErr = ChainBalanceEventValidate(o.chain_balance_events[index], opts.chain_balance_events_ItemOptions, `${path}.chain_balance_events[${index}]`) + if (chain_balance_eventsErr !== null) return chain_balance_eventsErr + } + if (opts.chain_balance_events_CustomCheck && !opts.chain_balance_events_CustomCheck(o.chain_balance_events)) return new Error(`${path}.chain_balance_events: custom check failed`) - if (typeof o.negative_balance !== 'number') return new Error(`${path}.negative_balance: is not a number`) - if (opts.negative_balance_CustomCheck && !opts.negative_balance_CustomCheck(o.negative_balance)) return new Error(`${path}.negative_balance: custom check failed`) + if (typeof o.offline_channels !== 'number') return new Error(`${path}.offline_channels: is not a number`) + if (opts.offline_channels_CustomCheck && !opts.offline_channels_CustomCheck(o.offline_channels)) return new Error(`${path}.offline_channels: custom check failed`) - if (typeof o.always_been_inactive !== 'number') return new Error(`${path}.always_been_inactive: is not a number`) - if (opts.always_been_inactive_CustomCheck && !opts.always_been_inactive_CustomCheck(o.always_been_inactive)) return new Error(`${path}.always_been_inactive: custom check failed`) + if (typeof o.online_channels !== 'number') return new Error(`${path}.online_channels: is not a number`) + if (opts.online_channels_CustomCheck && !opts.online_channels_CustomCheck(o.online_channels)) return new Error(`${path}.online_channels: custom check failed`) - if (typeof o.balance_avg !== 'number') return new Error(`${path}.balance_avg: is not a number`) - if (opts.balance_avg_CustomCheck && !opts.balance_avg_CustomCheck(o.balance_avg)) return new Error(`${path}.balance_avg: custom check failed`) + if (typeof o.pending_channels !== 'number') return new Error(`${path}.pending_channels: is not a number`) + if (opts.pending_channels_CustomCheck && !opts.pending_channels_CustomCheck(o.pending_channels)) return new Error(`${path}.pending_channels: custom check failed`) - if (typeof o.balance_median !== 'number') return new Error(`${path}.balance_median: is not a number`) - if (opts.balance_median_CustomCheck && !opts.balance_median_CustomCheck(o.balance_median)) return new Error(`${path}.balance_median: custom check failed`) + if (typeof o.closing_channels !== 'number') return new Error(`${path}.closing_channels: is not a number`) + if (opts.closing_channels_CustomCheck && !opts.closing_channels_CustomCheck(o.closing_channels)) return new Error(`${path}.closing_channels: custom check failed`) - return null -} + if (!Array.isArray(o.open_channels)) return new Error(`${path}.open_channels: is not an array`) + for (let index = 0; index < o.open_channels.length; index++) { + const open_channelsErr = OpenChannelValidate(o.open_channels[index], opts.open_channels_ItemOptions, `${path}.open_channels[${index}]`) + if (open_channelsErr !== null) return open_channelsErr + } + if (opts.open_channels_CustomCheck && !opts.open_channels_CustomCheck(o.open_channels)) return new Error(`${path}.open_channels: custom check failed`) -export type NewInvoiceResponse = { - invoice: string -} -export const NewInvoiceResponseOptionalFields: [] = [] -export type NewInvoiceResponseOptions = OptionsBaseMessage & { - checkOptionalsAreSet?: [] - invoice_CustomCheck?: (v: string) => boolean -} -export const NewInvoiceResponseValidate = (o?: NewInvoiceResponse, opts: NewInvoiceResponseOptions = {}, path: string = 'NewInvoiceResponse::root.'): Error | null => { - if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message') - if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null') + if (!Array.isArray(o.closed_channels)) return new Error(`${path}.closed_channels: is not an array`) + for (let index = 0; index < o.closed_channels.length; index++) { + const closed_channelsErr = ClosedChannelValidate(o.closed_channels[index], opts.closed_channels_ItemOptions, `${path}.closed_channels[${index}]`) + if (closed_channelsErr !== null) return closed_channelsErr + } + if (opts.closed_channels_CustomCheck && !opts.closed_channels_CustomCheck(o.closed_channels)) return new Error(`${path}.closed_channels: custom check failed`) - if (typeof o.invoice !== 'string') return new Error(`${path}.invoice: is not a string`) - if (opts.invoice_CustomCheck && !opts.invoice_CustomCheck(o.invoice)) return new Error(`${path}.invoice: custom check failed`) + if (!Array.isArray(o.channel_routing)) return new Error(`${path}.channel_routing: is not an array`) + for (let index = 0; index < o.channel_routing.length; index++) { + const channel_routingErr = ChannelRoutingValidate(o.channel_routing[index], opts.channel_routing_ItemOptions, `${path}.channel_routing[${index}]`) + if (channel_routingErr !== null) return channel_routingErr + } + if (opts.channel_routing_CustomCheck && !opts.channel_routing_CustomCheck(o.channel_routing)) return new Error(`${path}.channel_routing: custom check failed`) return null } -export type AddAppUserInvoiceRequest = { - receiver_identifier: string - payer_identifier: string - http_callback_url: string - invoice_req: NewInvoiceRequest +export type AuthAppRequest = { + name: string + allow_user_creation?: boolean } -export const AddAppUserInvoiceRequestOptionalFields: [] = [] -export type AddAppUserInvoiceRequestOptions = OptionsBaseMessage & { - checkOptionalsAreSet?: [] - receiver_identifier_CustomCheck?: (v: string) => boolean - payer_identifier_CustomCheck?: (v: string) => boolean - http_callback_url_CustomCheck?: (v: string) => boolean - invoice_req_Options?: NewInvoiceRequestOptions +export type AuthAppRequestOptionalField = 'allow_user_creation' +export const AuthAppRequestOptionalFields: AuthAppRequestOptionalField[] = ['allow_user_creation'] +export type AuthAppRequestOptions = OptionsBaseMessage & { + checkOptionalsAreSet?: AuthAppRequestOptionalField[] + name_CustomCheck?: (v: string) => boolean + allow_user_creation_CustomCheck?: (v?: boolean) => boolean } -export const AddAppUserInvoiceRequestValidate = (o?: AddAppUserInvoiceRequest, opts: AddAppUserInvoiceRequestOptions = {}, path: string = 'AddAppUserInvoiceRequest::root.'): Error | null => { +export const AuthAppRequestValidate = (o?: AuthAppRequest, opts: AuthAppRequestOptions = {}, path: string = 'AuthAppRequest::root.'): Error | null => { if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message') if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null') - if (typeof o.receiver_identifier !== 'string') return new Error(`${path}.receiver_identifier: is not a string`) - if (opts.receiver_identifier_CustomCheck && !opts.receiver_identifier_CustomCheck(o.receiver_identifier)) return new Error(`${path}.receiver_identifier: custom check failed`) - - if (typeof o.payer_identifier !== 'string') return new Error(`${path}.payer_identifier: is not a string`) - if (opts.payer_identifier_CustomCheck && !opts.payer_identifier_CustomCheck(o.payer_identifier)) return new Error(`${path}.payer_identifier: custom check failed`) - - if (typeof o.http_callback_url !== 'string') return new Error(`${path}.http_callback_url: is not a string`) - if (opts.http_callback_url_CustomCheck && !opts.http_callback_url_CustomCheck(o.http_callback_url)) return new Error(`${path}.http_callback_url: custom check failed`) - - const invoice_reqErr = NewInvoiceRequestValidate(o.invoice_req, opts.invoice_req_Options, `${path}.invoice_req`) - if (invoice_reqErr !== null) return invoice_reqErr - - - return null -} - -export type GetAppUserRequest = { - user_identifier: string -} -export const GetAppUserRequestOptionalFields: [] = [] -export type GetAppUserRequestOptions = OptionsBaseMessage & { - checkOptionalsAreSet?: [] - user_identifier_CustomCheck?: (v: string) => boolean -} -export const GetAppUserRequestValidate = (o?: GetAppUserRequest, opts: GetAppUserRequestOptions = {}, path: string = 'GetAppUserRequest::root.'): Error | null => { - if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message') - if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null') + if (typeof o.name !== 'string') return new Error(`${path}.name: is not a string`) + if (opts.name_CustomCheck && !opts.name_CustomCheck(o.name)) return new Error(`${path}.name: custom check failed`) - if (typeof o.user_identifier !== 'string') return new Error(`${path}.user_identifier: is not a string`) - if (opts.user_identifier_CustomCheck && !opts.user_identifier_CustomCheck(o.user_identifier)) return new Error(`${path}.user_identifier: custom check failed`) + if ((o.allow_user_creation || opts.allOptionalsAreSet || opts.checkOptionalsAreSet?.includes('allow_user_creation')) && typeof o.allow_user_creation !== 'boolean') return new Error(`${path}.allow_user_creation: is not a boolean`) + if (opts.allow_user_creation_CustomCheck && !opts.allow_user_creation_CustomCheck(o.allow_user_creation)) return new Error(`${path}.allow_user_creation: custom check failed`) return null } @@ -1966,208 +1709,26 @@ export const PayAddressResponseValidate = (o?: PayAddressResponse, opts: PayAddr return null } -export type Product = { - id: string - name: string - price_sats: number -} -export const ProductOptionalFields: [] = [] -export type ProductOptions = OptionsBaseMessage & { - checkOptionalsAreSet?: [] - id_CustomCheck?: (v: string) => boolean - name_CustomCheck?: (v: string) => boolean - price_sats_CustomCheck?: (v: number) => boolean -} -export const ProductValidate = (o?: Product, opts: ProductOptions = {}, path: string = 'Product::root.'): Error | null => { - if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message') - if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null') - - if (typeof o.id !== 'string') return new Error(`${path}.id: is not a string`) - if (opts.id_CustomCheck && !opts.id_CustomCheck(o.id)) return new Error(`${path}.id: custom check failed`) - - if (typeof o.name !== 'string') return new Error(`${path}.name: is not a string`) - if (opts.name_CustomCheck && !opts.name_CustomCheck(o.name)) return new Error(`${path}.name: custom check failed`) - - if (typeof o.price_sats !== 'number') return new Error(`${path}.price_sats: is not a number`) - if (opts.price_sats_CustomCheck && !opts.price_sats_CustomCheck(o.price_sats)) return new Error(`${path}.price_sats: custom check failed`) - - return null -} - -export type AppsMetrics = { - apps: AppMetrics[] -} -export const AppsMetricsOptionalFields: [] = [] -export type AppsMetricsOptions = OptionsBaseMessage & { - checkOptionalsAreSet?: [] - apps_ItemOptions?: AppMetricsOptions - apps_CustomCheck?: (v: AppMetrics[]) => boolean -} -export const AppsMetricsValidate = (o?: AppsMetrics, opts: AppsMetricsOptions = {}, path: string = 'AppsMetrics::root.'): Error | null => { - if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message') - if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null') - - if (!Array.isArray(o.apps)) return new Error(`${path}.apps: is not an array`) - for (let index = 0; index < o.apps.length; index++) { - const appsErr = AppMetricsValidate(o.apps[index], opts.apps_ItemOptions, `${path}.apps[${index}]`) - if (appsErr !== null) return appsErr - } - if (opts.apps_CustomCheck && !opts.apps_CustomCheck(o.apps)) return new Error(`${path}.apps: custom check failed`) - - return null -} - -export type LndGetInfoRequest = { - nodeId: number -} -export const LndGetInfoRequestOptionalFields: [] = [] -export type LndGetInfoRequestOptions = OptionsBaseMessage & { - checkOptionalsAreSet?: [] - nodeId_CustomCheck?: (v: number) => boolean -} -export const LndGetInfoRequestValidate = (o?: LndGetInfoRequest, opts: LndGetInfoRequestOptions = {}, path: string = 'LndGetInfoRequest::root.'): Error | null => { - if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message') - if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null') - - if (typeof o.nodeId !== 'number') return new Error(`${path}.nodeId: is not a number`) - if (opts.nodeId_CustomCheck && !opts.nodeId_CustomCheck(o.nodeId)) return new Error(`${path}.nodeId: custom check failed`) - - return null -} - -export type AddAppUserRequest = { - identifier: string - fail_if_exists: boolean - balance: number -} -export const AddAppUserRequestOptionalFields: [] = [] -export type AddAppUserRequestOptions = OptionsBaseMessage & { - checkOptionalsAreSet?: [] - identifier_CustomCheck?: (v: string) => boolean - fail_if_exists_CustomCheck?: (v: boolean) => boolean - balance_CustomCheck?: (v: number) => boolean -} -export const AddAppUserRequestValidate = (o?: AddAppUserRequest, opts: AddAppUserRequestOptions = {}, path: string = 'AddAppUserRequest::root.'): Error | null => { - if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message') - if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null') - - if (typeof o.identifier !== 'string') return new Error(`${path}.identifier: is not a string`) - if (opts.identifier_CustomCheck && !opts.identifier_CustomCheck(o.identifier)) return new Error(`${path}.identifier: custom check failed`) - - if (typeof o.fail_if_exists !== 'boolean') return new Error(`${path}.fail_if_exists: is not a boolean`) - if (opts.fail_if_exists_CustomCheck && !opts.fail_if_exists_CustomCheck(o.fail_if_exists)) return new Error(`${path}.fail_if_exists: custom check failed`) - - if (typeof o.balance !== 'number') return new Error(`${path}.balance: is not a number`) - if (opts.balance_CustomCheck && !opts.balance_CustomCheck(o.balance)) return new Error(`${path}.balance: custom check failed`) - - return null -} - -export type SendAppUserToAppUserPaymentRequest = { - from_user_identifier: string - to_user_identifier: string - amount: number -} -export const SendAppUserToAppUserPaymentRequestOptionalFields: [] = [] -export type SendAppUserToAppUserPaymentRequestOptions = OptionsBaseMessage & { - checkOptionalsAreSet?: [] - from_user_identifier_CustomCheck?: (v: string) => boolean - to_user_identifier_CustomCheck?: (v: string) => boolean - amount_CustomCheck?: (v: number) => boolean -} -export const SendAppUserToAppUserPaymentRequestValidate = (o?: SendAppUserToAppUserPaymentRequest, opts: SendAppUserToAppUserPaymentRequestOptions = {}, path: string = 'SendAppUserToAppUserPaymentRequest::root.'): Error | null => { - if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message') - if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null') - - if (typeof o.from_user_identifier !== 'string') return new Error(`${path}.from_user_identifier: is not a string`) - if (opts.from_user_identifier_CustomCheck && !opts.from_user_identifier_CustomCheck(o.from_user_identifier)) return new Error(`${path}.from_user_identifier: custom check failed`) - - if (typeof o.to_user_identifier !== 'string') return new Error(`${path}.to_user_identifier: is not a string`) - if (opts.to_user_identifier_CustomCheck && !opts.to_user_identifier_CustomCheck(o.to_user_identifier)) return new Error(`${path}.to_user_identifier: custom check failed`) - - if (typeof o.amount !== 'number') return new Error(`${path}.amount: is not a number`) - if (opts.amount_CustomCheck && !opts.amount_CustomCheck(o.amount)) return new Error(`${path}.amount: custom check failed`) - - return null -} - -export type UserInfo = { - userId: string - balance: number - max_withdrawable: number - user_identifier: string - service_fee_bps: number - network_max_fee_bps: number - network_max_fee_fixed: number -} -export const UserInfoOptionalFields: [] = [] -export type UserInfoOptions = OptionsBaseMessage & { - checkOptionalsAreSet?: [] - userId_CustomCheck?: (v: string) => boolean - balance_CustomCheck?: (v: number) => boolean - max_withdrawable_CustomCheck?: (v: number) => boolean - user_identifier_CustomCheck?: (v: string) => boolean - service_fee_bps_CustomCheck?: (v: number) => boolean - network_max_fee_bps_CustomCheck?: (v: number) => boolean - network_max_fee_fixed_CustomCheck?: (v: number) => boolean -} -export const UserInfoValidate = (o?: UserInfo, opts: UserInfoOptions = {}, path: string = 'UserInfo::root.'): Error | null => { - if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message') - if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null') - - if (typeof o.userId !== 'string') return new Error(`${path}.userId: is not a string`) - if (opts.userId_CustomCheck && !opts.userId_CustomCheck(o.userId)) return new Error(`${path}.userId: custom check failed`) - - if (typeof o.balance !== 'number') return new Error(`${path}.balance: is not a number`) - if (opts.balance_CustomCheck && !opts.balance_CustomCheck(o.balance)) return new Error(`${path}.balance: custom check failed`) - - if (typeof o.max_withdrawable !== 'number') return new Error(`${path}.max_withdrawable: is not a number`) - if (opts.max_withdrawable_CustomCheck && !opts.max_withdrawable_CustomCheck(o.max_withdrawable)) return new Error(`${path}.max_withdrawable: custom check failed`) - - if (typeof o.user_identifier !== 'string') return new Error(`${path}.user_identifier: is not a string`) - if (opts.user_identifier_CustomCheck && !opts.user_identifier_CustomCheck(o.user_identifier)) return new Error(`${path}.user_identifier: custom check failed`) - - if (typeof o.service_fee_bps !== 'number') return new Error(`${path}.service_fee_bps: is not a number`) - if (opts.service_fee_bps_CustomCheck && !opts.service_fee_bps_CustomCheck(o.service_fee_bps)) return new Error(`${path}.service_fee_bps: custom check failed`) - - if (typeof o.network_max_fee_bps !== 'number') return new Error(`${path}.network_max_fee_bps: is not a number`) - if (opts.network_max_fee_bps_CustomCheck && !opts.network_max_fee_bps_CustomCheck(o.network_max_fee_bps)) return new Error(`${path}.network_max_fee_bps: custom check failed`) - - if (typeof o.network_max_fee_fixed !== 'number') return new Error(`${path}.network_max_fee_fixed: is not a number`) - if (opts.network_max_fee_fixed_CustomCheck && !opts.network_max_fee_fixed_CustomCheck(o.network_max_fee_fixed)) return new Error(`${path}.network_max_fee_fixed: custom check failed`) - - return null -} - -export type ChannelBalanceEvent = { - block_height: number - channel_id: string - local_balance_sats: number - remote_balance_sats: number +export type LndMetricsRequest = { + from_unix?: number + to_unix?: number } -export const ChannelBalanceEventOptionalFields: [] = [] -export type ChannelBalanceEventOptions = OptionsBaseMessage & { - checkOptionalsAreSet?: [] - block_height_CustomCheck?: (v: number) => boolean - channel_id_CustomCheck?: (v: string) => boolean - local_balance_sats_CustomCheck?: (v: number) => boolean - remote_balance_sats_CustomCheck?: (v: number) => boolean +export type LndMetricsRequestOptionalField = 'from_unix' | 'to_unix' +export const LndMetricsRequestOptionalFields: LndMetricsRequestOptionalField[] = ['from_unix', 'to_unix'] +export type LndMetricsRequestOptions = OptionsBaseMessage & { + checkOptionalsAreSet?: LndMetricsRequestOptionalField[] + from_unix_CustomCheck?: (v?: number) => boolean + to_unix_CustomCheck?: (v?: number) => boolean } -export const ChannelBalanceEventValidate = (o?: ChannelBalanceEvent, opts: ChannelBalanceEventOptions = {}, path: string = 'ChannelBalanceEvent::root.'): Error | null => { +export const LndMetricsRequestValidate = (o?: LndMetricsRequest, opts: LndMetricsRequestOptions = {}, path: string = 'LndMetricsRequest::root.'): Error | null => { if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message') if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null') - if (typeof o.block_height !== 'number') return new Error(`${path}.block_height: is not a number`) - if (opts.block_height_CustomCheck && !opts.block_height_CustomCheck(o.block_height)) return new Error(`${path}.block_height: custom check failed`) - - if (typeof o.channel_id !== 'string') return new Error(`${path}.channel_id: is not a string`) - if (opts.channel_id_CustomCheck && !opts.channel_id_CustomCheck(o.channel_id)) return new Error(`${path}.channel_id: custom check failed`) - - if (typeof o.local_balance_sats !== 'number') return new Error(`${path}.local_balance_sats: is not a number`) - if (opts.local_balance_sats_CustomCheck && !opts.local_balance_sats_CustomCheck(o.local_balance_sats)) return new Error(`${path}.local_balance_sats: custom check failed`) + if ((o.from_unix || opts.allOptionalsAreSet || opts.checkOptionalsAreSet?.includes('from_unix')) && typeof o.from_unix !== 'number') return new Error(`${path}.from_unix: is not a number`) + if (opts.from_unix_CustomCheck && !opts.from_unix_CustomCheck(o.from_unix)) return new Error(`${path}.from_unix: custom check failed`) - if (typeof o.remote_balance_sats !== 'number') return new Error(`${path}.remote_balance_sats: is not a number`) - if (opts.remote_balance_sats_CustomCheck && !opts.remote_balance_sats_CustomCheck(o.remote_balance_sats)) return new Error(`${path}.remote_balance_sats: custom check failed`) + if ((o.to_unix || opts.allOptionalsAreSet || opts.checkOptionalsAreSet?.includes('to_unix')) && typeof o.to_unix !== 'number') return new Error(`${path}.to_unix: is not a number`) + if (opts.to_unix_CustomCheck && !opts.to_unix_CustomCheck(o.to_unix)) return new Error(`${path}.to_unix: custom check failed`) return null } @@ -2215,189 +1776,618 @@ export const OpenChannelValidate = (o?: OpenChannel, opts: OpenChannelOptions = return null } -export type GetAppUserLNURLInfoRequest = { - user_identifier: string - base_url_override: string +export type NewInvoiceResponse = { + invoice: string } -export const GetAppUserLNURLInfoRequestOptionalFields: [] = [] -export type GetAppUserLNURLInfoRequestOptions = OptionsBaseMessage & { +export const NewInvoiceResponseOptionalFields: [] = [] +export type NewInvoiceResponseOptions = OptionsBaseMessage & { checkOptionalsAreSet?: [] - user_identifier_CustomCheck?: (v: string) => boolean - base_url_override_CustomCheck?: (v: string) => boolean + invoice_CustomCheck?: (v: string) => boolean } -export const GetAppUserLNURLInfoRequestValidate = (o?: GetAppUserLNURLInfoRequest, opts: GetAppUserLNURLInfoRequestOptions = {}, path: string = 'GetAppUserLNURLInfoRequest::root.'): Error | null => { +export const NewInvoiceResponseValidate = (o?: NewInvoiceResponse, opts: NewInvoiceResponseOptions = {}, path: string = 'NewInvoiceResponse::root.'): Error | null => { if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message') if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null') - if (typeof o.user_identifier !== 'string') return new Error(`${path}.user_identifier: is not a string`) - if (opts.user_identifier_CustomCheck && !opts.user_identifier_CustomCheck(o.user_identifier)) return new Error(`${path}.user_identifier: custom check failed`) - - if (typeof o.base_url_override !== 'string') return new Error(`${path}.base_url_override: is not a string`) - if (opts.base_url_override_CustomCheck && !opts.base_url_override_CustomCheck(o.base_url_override)) return new Error(`${path}.base_url_override: custom check failed`) + if (typeof o.invoice !== 'string') return new Error(`${path}.invoice: is not a string`) + if (opts.invoice_CustomCheck && !opts.invoice_CustomCheck(o.invoice)) return new Error(`${path}.invoice: custom check failed`) return null } -export type NewInvoiceRequest = { - amountSats: number - memo: string +export type ChannelRouting = { + channel_id: string + send_errors: number + receive_errors: number + forward_errors_as_input: number + forward_errors_as_output: number + missed_forward_fee_as_input: number + missed_forward_fee_as_output: number + forward_fee_as_input: number + forward_fee_as_output: number + events_number: number } -export const NewInvoiceRequestOptionalFields: [] = [] -export type NewInvoiceRequestOptions = OptionsBaseMessage & { +export const ChannelRoutingOptionalFields: [] = [] +export type ChannelRoutingOptions = OptionsBaseMessage & { checkOptionalsAreSet?: [] - amountSats_CustomCheck?: (v: number) => boolean - memo_CustomCheck?: (v: string) => boolean -} -export const NewInvoiceRequestValidate = (o?: NewInvoiceRequest, opts: NewInvoiceRequestOptions = {}, path: string = 'NewInvoiceRequest::root.'): Error | null => { - if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message') - if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null') - - if (typeof o.amountSats !== 'number') return new Error(`${path}.amountSats: is not a number`) - if (opts.amountSats_CustomCheck && !opts.amountSats_CustomCheck(o.amountSats)) return new Error(`${path}.amountSats: custom check failed`) - - if (typeof o.memo !== 'string') return new Error(`${path}.memo: is not a string`) - if (opts.memo_CustomCheck && !opts.memo_CustomCheck(o.memo)) return new Error(`${path}.memo: custom check failed`) + channel_id_CustomCheck?: (v: string) => boolean + send_errors_CustomCheck?: (v: number) => boolean + receive_errors_CustomCheck?: (v: number) => boolean + forward_errors_as_input_CustomCheck?: (v: number) => boolean + forward_errors_as_output_CustomCheck?: (v: number) => boolean + missed_forward_fee_as_input_CustomCheck?: (v: number) => boolean + missed_forward_fee_as_output_CustomCheck?: (v: number) => boolean + forward_fee_as_input_CustomCheck?: (v: number) => boolean + forward_fee_as_output_CustomCheck?: (v: number) => boolean + events_number_CustomCheck?: (v: number) => boolean +} +export const ChannelRoutingValidate = (o?: ChannelRouting, opts: ChannelRoutingOptions = {}, path: string = 'ChannelRouting::root.'): Error | null => { + if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message') + if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null') + + if (typeof o.channel_id !== 'string') return new Error(`${path}.channel_id: is not a string`) + if (opts.channel_id_CustomCheck && !opts.channel_id_CustomCheck(o.channel_id)) return new Error(`${path}.channel_id: custom check failed`) + + if (typeof o.send_errors !== 'number') return new Error(`${path}.send_errors: is not a number`) + if (opts.send_errors_CustomCheck && !opts.send_errors_CustomCheck(o.send_errors)) return new Error(`${path}.send_errors: custom check failed`) + + if (typeof o.receive_errors !== 'number') return new Error(`${path}.receive_errors: is not a number`) + if (opts.receive_errors_CustomCheck && !opts.receive_errors_CustomCheck(o.receive_errors)) return new Error(`${path}.receive_errors: custom check failed`) + + if (typeof o.forward_errors_as_input !== 'number') return new Error(`${path}.forward_errors_as_input: is not a number`) + if (opts.forward_errors_as_input_CustomCheck && !opts.forward_errors_as_input_CustomCheck(o.forward_errors_as_input)) return new Error(`${path}.forward_errors_as_input: custom check failed`) + + if (typeof o.forward_errors_as_output !== 'number') return new Error(`${path}.forward_errors_as_output: is not a number`) + if (opts.forward_errors_as_output_CustomCheck && !opts.forward_errors_as_output_CustomCheck(o.forward_errors_as_output)) return new Error(`${path}.forward_errors_as_output: custom check failed`) + + if (typeof o.missed_forward_fee_as_input !== 'number') return new Error(`${path}.missed_forward_fee_as_input: is not a number`) + if (opts.missed_forward_fee_as_input_CustomCheck && !opts.missed_forward_fee_as_input_CustomCheck(o.missed_forward_fee_as_input)) return new Error(`${path}.missed_forward_fee_as_input: custom check failed`) + + if (typeof o.missed_forward_fee_as_output !== 'number') return new Error(`${path}.missed_forward_fee_as_output: is not a number`) + if (opts.missed_forward_fee_as_output_CustomCheck && !opts.missed_forward_fee_as_output_CustomCheck(o.missed_forward_fee_as_output)) return new Error(`${path}.missed_forward_fee_as_output: custom check failed`) + + if (typeof o.forward_fee_as_input !== 'number') return new Error(`${path}.forward_fee_as_input: is not a number`) + if (opts.forward_fee_as_input_CustomCheck && !opts.forward_fee_as_input_CustomCheck(o.forward_fee_as_input)) return new Error(`${path}.forward_fee_as_input: custom check failed`) + + if (typeof o.forward_fee_as_output !== 'number') return new Error(`${path}.forward_fee_as_output: is not a number`) + if (opts.forward_fee_as_output_CustomCheck && !opts.forward_fee_as_output_CustomCheck(o.forward_fee_as_output)) return new Error(`${path}.forward_fee_as_output: custom check failed`) + + if (typeof o.events_number !== 'number') return new Error(`${path}.events_number: is not a number`) + if (opts.events_number_CustomCheck && !opts.events_number_CustomCheck(o.events_number)) return new Error(`${path}.events_number: custom check failed`) + + return null +} + +export type LnurlPayInfoResponse = { + tag: string + callback: string + maxSendable: number + minSendable: number + metadata: string + allowsNostr: boolean + nostrPubkey: string +} +export const LnurlPayInfoResponseOptionalFields: [] = [] +export type LnurlPayInfoResponseOptions = OptionsBaseMessage & { + checkOptionalsAreSet?: [] + tag_CustomCheck?: (v: string) => boolean + callback_CustomCheck?: (v: string) => boolean + maxSendable_CustomCheck?: (v: number) => boolean + minSendable_CustomCheck?: (v: number) => boolean + metadata_CustomCheck?: (v: string) => boolean + allowsNostr_CustomCheck?: (v: boolean) => boolean + nostrPubkey_CustomCheck?: (v: string) => boolean +} +export const LnurlPayInfoResponseValidate = (o?: LnurlPayInfoResponse, opts: LnurlPayInfoResponseOptions = {}, path: string = 'LnurlPayInfoResponse::root.'): Error | null => { + if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message') + if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null') + + if (typeof o.tag !== 'string') return new Error(`${path}.tag: is not a string`) + if (opts.tag_CustomCheck && !opts.tag_CustomCheck(o.tag)) return new Error(`${path}.tag: custom check failed`) + + if (typeof o.callback !== 'string') return new Error(`${path}.callback: is not a string`) + if (opts.callback_CustomCheck && !opts.callback_CustomCheck(o.callback)) return new Error(`${path}.callback: custom check failed`) + + if (typeof o.maxSendable !== 'number') return new Error(`${path}.maxSendable: is not a number`) + if (opts.maxSendable_CustomCheck && !opts.maxSendable_CustomCheck(o.maxSendable)) return new Error(`${path}.maxSendable: custom check failed`) + + if (typeof o.minSendable !== 'number') return new Error(`${path}.minSendable: is not a number`) + if (opts.minSendable_CustomCheck && !opts.minSendable_CustomCheck(o.minSendable)) return new Error(`${path}.minSendable: custom check failed`) + + if (typeof o.metadata !== 'string') return new Error(`${path}.metadata: is not a string`) + if (opts.metadata_CustomCheck && !opts.metadata_CustomCheck(o.metadata)) return new Error(`${path}.metadata: custom check failed`) + + if (typeof o.allowsNostr !== 'boolean') return new Error(`${path}.allowsNostr: is not a boolean`) + if (opts.allowsNostr_CustomCheck && !opts.allowsNostr_CustomCheck(o.allowsNostr)) return new Error(`${path}.allowsNostr: custom check failed`) + + if (typeof o.nostrPubkey !== 'string') return new Error(`${path}.nostrPubkey: is not a string`) + if (opts.nostrPubkey_CustomCheck && !opts.nostrPubkey_CustomCheck(o.nostrPubkey)) return new Error(`${path}.nostrPubkey: custom check failed`) + + return null +} + +export type GetUserOperationsRequest = { + latestIncomingInvoice: number + latestOutgoingInvoice: number + latestIncomingTx: number + latestOutgoingTx: number + latestIncomingUserToUserPayment: number + latestOutgoingUserToUserPayment: number + max_size: number +} +export const GetUserOperationsRequestOptionalFields: [] = [] +export type GetUserOperationsRequestOptions = OptionsBaseMessage & { + checkOptionalsAreSet?: [] + latestIncomingInvoice_CustomCheck?: (v: number) => boolean + latestOutgoingInvoice_CustomCheck?: (v: number) => boolean + latestIncomingTx_CustomCheck?: (v: number) => boolean + latestOutgoingTx_CustomCheck?: (v: number) => boolean + latestIncomingUserToUserPayment_CustomCheck?: (v: number) => boolean + latestOutgoingUserToUserPayment_CustomCheck?: (v: number) => boolean + max_size_CustomCheck?: (v: number) => boolean +} +export const GetUserOperationsRequestValidate = (o?: GetUserOperationsRequest, opts: GetUserOperationsRequestOptions = {}, path: string = 'GetUserOperationsRequest::root.'): Error | null => { + if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message') + if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null') + + if (typeof o.latestIncomingInvoice !== 'number') return new Error(`${path}.latestIncomingInvoice: is not a number`) + if (opts.latestIncomingInvoice_CustomCheck && !opts.latestIncomingInvoice_CustomCheck(o.latestIncomingInvoice)) return new Error(`${path}.latestIncomingInvoice: custom check failed`) + + if (typeof o.latestOutgoingInvoice !== 'number') return new Error(`${path}.latestOutgoingInvoice: is not a number`) + if (opts.latestOutgoingInvoice_CustomCheck && !opts.latestOutgoingInvoice_CustomCheck(o.latestOutgoingInvoice)) return new Error(`${path}.latestOutgoingInvoice: custom check failed`) + + if (typeof o.latestIncomingTx !== 'number') return new Error(`${path}.latestIncomingTx: is not a number`) + if (opts.latestIncomingTx_CustomCheck && !opts.latestIncomingTx_CustomCheck(o.latestIncomingTx)) return new Error(`${path}.latestIncomingTx: custom check failed`) + + if (typeof o.latestOutgoingTx !== 'number') return new Error(`${path}.latestOutgoingTx: is not a number`) + if (opts.latestOutgoingTx_CustomCheck && !opts.latestOutgoingTx_CustomCheck(o.latestOutgoingTx)) return new Error(`${path}.latestOutgoingTx: custom check failed`) + + if (typeof o.latestIncomingUserToUserPayment !== 'number') return new Error(`${path}.latestIncomingUserToUserPayment: is not a number`) + if (opts.latestIncomingUserToUserPayment_CustomCheck && !opts.latestIncomingUserToUserPayment_CustomCheck(o.latestIncomingUserToUserPayment)) return new Error(`${path}.latestIncomingUserToUserPayment: custom check failed`) + + if (typeof o.latestOutgoingUserToUserPayment !== 'number') return new Error(`${path}.latestOutgoingUserToUserPayment: is not a number`) + if (opts.latestOutgoingUserToUserPayment_CustomCheck && !opts.latestOutgoingUserToUserPayment_CustomCheck(o.latestOutgoingUserToUserPayment)) return new Error(`${path}.latestOutgoingUserToUserPayment: custom check failed`) + + if (typeof o.max_size !== 'number') return new Error(`${path}.max_size: is not a number`) + if (opts.max_size_CustomCheck && !opts.max_size_CustomCheck(o.max_size)) return new Error(`${path}.max_size: custom check failed`) + + return null +} + +export type RelaysMigration = { + relays: string[] +} +export const RelaysMigrationOptionalFields: [] = [] +export type RelaysMigrationOptions = OptionsBaseMessage & { + checkOptionalsAreSet?: [] + relays_CustomCheck?: (v: string[]) => boolean +} +export const RelaysMigrationValidate = (o?: RelaysMigration, opts: RelaysMigrationOptions = {}, path: string = 'RelaysMigration::root.'): Error | null => { + if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message') + if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null') + + if (!Array.isArray(o.relays)) return new Error(`${path}.relays: is not an array`) + for (let index = 0; index < o.relays.length; index++) { + if (typeof o.relays[index] !== 'string') return new Error(`${path}.relays[${index}]: is not a string`) + } + if (opts.relays_CustomCheck && !opts.relays_CustomCheck(o.relays)) return new Error(`${path}.relays: custom check failed`) + + return null +} + +export type RequestNPubLinkingTokenResponse = { + token: string +} +export const RequestNPubLinkingTokenResponseOptionalFields: [] = [] +export type RequestNPubLinkingTokenResponseOptions = OptionsBaseMessage & { + checkOptionalsAreSet?: [] + token_CustomCheck?: (v: string) => boolean +} +export const RequestNPubLinkingTokenResponseValidate = (o?: RequestNPubLinkingTokenResponse, opts: RequestNPubLinkingTokenResponseOptions = {}, path: string = 'RequestNPubLinkingTokenResponse::root.'): Error | null => { + if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message') + if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null') + + if (typeof o.token !== 'string') return new Error(`${path}.token: is not a string`) + if (opts.token_CustomCheck && !opts.token_CustomCheck(o.token)) return new Error(`${path}.token: custom check failed`) + + return null +} + +export type BannedAppUser = { + app_name: string + app_id: string + user_identifier: string + nostr_pub: string +} +export const BannedAppUserOptionalFields: [] = [] +export type BannedAppUserOptions = OptionsBaseMessage & { + checkOptionalsAreSet?: [] + app_name_CustomCheck?: (v: string) => boolean + app_id_CustomCheck?: (v: string) => boolean + user_identifier_CustomCheck?: (v: string) => boolean + nostr_pub_CustomCheck?: (v: string) => boolean +} +export const BannedAppUserValidate = (o?: BannedAppUser, opts: BannedAppUserOptions = {}, path: string = 'BannedAppUser::root.'): Error | null => { + if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message') + if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null') + + if (typeof o.app_name !== 'string') return new Error(`${path}.app_name: is not a string`) + if (opts.app_name_CustomCheck && !opts.app_name_CustomCheck(o.app_name)) return new Error(`${path}.app_name: custom check failed`) + + if (typeof o.app_id !== 'string') return new Error(`${path}.app_id: is not a string`) + if (opts.app_id_CustomCheck && !opts.app_id_CustomCheck(o.app_id)) return new Error(`${path}.app_id: custom check failed`) + + if (typeof o.user_identifier !== 'string') return new Error(`${path}.user_identifier: is not a string`) + if (opts.user_identifier_CustomCheck && !opts.user_identifier_CustomCheck(o.user_identifier)) return new Error(`${path}.user_identifier: custom check failed`) + + if (typeof o.nostr_pub !== 'string') return new Error(`${path}.nostr_pub: is not a string`) + if (opts.nostr_pub_CustomCheck && !opts.nostr_pub_CustomCheck(o.nostr_pub)) return new Error(`${path}.nostr_pub: custom check failed`) + + return null +} + +export type Application = { + name: string + id: string + balance: number + npub: string +} +export const ApplicationOptionalFields: [] = [] +export type ApplicationOptions = OptionsBaseMessage & { + checkOptionalsAreSet?: [] + name_CustomCheck?: (v: string) => boolean + id_CustomCheck?: (v: string) => boolean + balance_CustomCheck?: (v: number) => boolean + npub_CustomCheck?: (v: string) => boolean +} +export const ApplicationValidate = (o?: Application, opts: ApplicationOptions = {}, path: string = 'Application::root.'): Error | null => { + if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message') + if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null') + + if (typeof o.name !== 'string') return new Error(`${path}.name: is not a string`) + if (opts.name_CustomCheck && !opts.name_CustomCheck(o.name)) return new Error(`${path}.name: custom check failed`) + + if (typeof o.id !== 'string') return new Error(`${path}.id: is not a string`) + if (opts.id_CustomCheck && !opts.id_CustomCheck(o.id)) return new Error(`${path}.id: custom check failed`) + + if (typeof o.balance !== 'number') return new Error(`${path}.balance: is not a number`) + if (opts.balance_CustomCheck && !opts.balance_CustomCheck(o.balance)) return new Error(`${path}.balance: custom check failed`) + + if (typeof o.npub !== 'string') return new Error(`${path}.npub: is not a string`) + if (opts.npub_CustomCheck && !opts.npub_CustomCheck(o.npub)) return new Error(`${path}.npub: custom check failed`) + + return null +} + +export type PayInvoiceResponse = { + preimage: string + amount_paid: number + operation_id: string + service_fee: number + network_fee: number +} +export const PayInvoiceResponseOptionalFields: [] = [] +export type PayInvoiceResponseOptions = OptionsBaseMessage & { + checkOptionalsAreSet?: [] + preimage_CustomCheck?: (v: string) => boolean + amount_paid_CustomCheck?: (v: number) => boolean + operation_id_CustomCheck?: (v: string) => boolean + service_fee_CustomCheck?: (v: number) => boolean + network_fee_CustomCheck?: (v: number) => boolean +} +export const PayInvoiceResponseValidate = (o?: PayInvoiceResponse, opts: PayInvoiceResponseOptions = {}, path: string = 'PayInvoiceResponse::root.'): Error | null => { + if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message') + if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null') + + if (typeof o.preimage !== 'string') return new Error(`${path}.preimage: is not a string`) + if (opts.preimage_CustomCheck && !opts.preimage_CustomCheck(o.preimage)) return new Error(`${path}.preimage: custom check failed`) + + if (typeof o.amount_paid !== 'number') return new Error(`${path}.amount_paid: is not a number`) + if (opts.amount_paid_CustomCheck && !opts.amount_paid_CustomCheck(o.amount_paid)) return new Error(`${path}.amount_paid: custom check failed`) + + if (typeof o.operation_id !== 'string') return new Error(`${path}.operation_id: is not a string`) + if (opts.operation_id_CustomCheck && !opts.operation_id_CustomCheck(o.operation_id)) return new Error(`${path}.operation_id: custom check failed`) + + if (typeof o.service_fee !== 'number') return new Error(`${path}.service_fee: is not a number`) + if (opts.service_fee_CustomCheck && !opts.service_fee_CustomCheck(o.service_fee)) return new Error(`${path}.service_fee: custom check failed`) + + if (typeof o.network_fee !== 'number') return new Error(`${path}.network_fee: is not a number`) + if (opts.network_fee_CustomCheck && !opts.network_fee_CustomCheck(o.network_fee)) return new Error(`${path}.network_fee: custom check failed`) + + return null +} + +export type LnurlLinkResponse = { + lnurl: string + k1: string +} +export const LnurlLinkResponseOptionalFields: [] = [] +export type LnurlLinkResponseOptions = OptionsBaseMessage & { + checkOptionalsAreSet?: [] + lnurl_CustomCheck?: (v: string) => boolean + k1_CustomCheck?: (v: string) => boolean +} +export const LnurlLinkResponseValidate = (o?: LnurlLinkResponse, opts: LnurlLinkResponseOptions = {}, path: string = 'LnurlLinkResponse::root.'): Error | null => { + if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message') + if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null') + + if (typeof o.lnurl !== 'string') return new Error(`${path}.lnurl: is not a string`) + if (opts.lnurl_CustomCheck && !opts.lnurl_CustomCheck(o.lnurl)) return new Error(`${path}.lnurl: custom check failed`) + + if (typeof o.k1 !== 'string') return new Error(`${path}.k1: is not a string`) + if (opts.k1_CustomCheck && !opts.k1_CustomCheck(o.k1)) return new Error(`${path}.k1: custom check failed`) + + return null +} + +export type LndMetrics = { + nodes: LndNodeMetrics[] +} +export const LndMetricsOptionalFields: [] = [] +export type LndMetricsOptions = OptionsBaseMessage & { + checkOptionalsAreSet?: [] + nodes_ItemOptions?: LndNodeMetricsOptions + nodes_CustomCheck?: (v: LndNodeMetrics[]) => boolean +} +export const LndMetricsValidate = (o?: LndMetrics, opts: LndMetricsOptions = {}, path: string = 'LndMetrics::root.'): Error | null => { + if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message') + if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null') + + if (!Array.isArray(o.nodes)) return new Error(`${path}.nodes: is not an array`) + for (let index = 0; index < o.nodes.length; index++) { + const nodesErr = LndNodeMetricsValidate(o.nodes[index], opts.nodes_ItemOptions, `${path}.nodes[${index}]`) + if (nodesErr !== null) return nodesErr + } + if (opts.nodes_CustomCheck && !opts.nodes_CustomCheck(o.nodes)) return new Error(`${path}.nodes: custom check failed`) + + return null +} + +export type LndGetInfoResponse = { + alias: string +} +export const LndGetInfoResponseOptionalFields: [] = [] +export type LndGetInfoResponseOptions = OptionsBaseMessage & { + checkOptionalsAreSet?: [] + alias_CustomCheck?: (v: string) => boolean +} +export const LndGetInfoResponseValidate = (o?: LndGetInfoResponse, opts: LndGetInfoResponseOptions = {}, path: string = 'LndGetInfoResponse::root.'): Error | null => { + if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message') + if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null') + + if (typeof o.alias !== 'string') return new Error(`${path}.alias: is not a string`) + if (opts.alias_CustomCheck && !opts.alias_CustomCheck(o.alias)) return new Error(`${path}.alias: custom check failed`) + + return null +} + +export type PayAddressRequest = { + address: string + amoutSats: number + satsPerVByte: number +} +export const PayAddressRequestOptionalFields: [] = [] +export type PayAddressRequestOptions = OptionsBaseMessage & { + checkOptionalsAreSet?: [] + address_CustomCheck?: (v: string) => boolean + amoutSats_CustomCheck?: (v: number) => boolean + satsPerVByte_CustomCheck?: (v: number) => boolean +} +export const PayAddressRequestValidate = (o?: PayAddressRequest, opts: PayAddressRequestOptions = {}, path: string = 'PayAddressRequest::root.'): Error | null => { + if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message') + if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null') + + if (typeof o.address !== 'string') return new Error(`${path}.address: is not a string`) + if (opts.address_CustomCheck && !opts.address_CustomCheck(o.address)) return new Error(`${path}.address: custom check failed`) + + if (typeof o.amoutSats !== 'number') return new Error(`${path}.amoutSats: is not a number`) + if (opts.amoutSats_CustomCheck && !opts.amoutSats_CustomCheck(o.amoutSats)) return new Error(`${path}.amoutSats: custom check failed`) + + if (typeof o.satsPerVByte !== 'number') return new Error(`${path}.satsPerVByte: is not a number`) + if (opts.satsPerVByte_CustomCheck && !opts.satsPerVByte_CustomCheck(o.satsPerVByte)) return new Error(`${path}.satsPerVByte: custom check failed`) + + return null +} + +export type OpenChannelRequest = { + destination: string + fundingAmount: number + pushAmount: number + closeAddress: string +} +export const OpenChannelRequestOptionalFields: [] = [] +export type OpenChannelRequestOptions = OptionsBaseMessage & { + checkOptionalsAreSet?: [] + destination_CustomCheck?: (v: string) => boolean + fundingAmount_CustomCheck?: (v: number) => boolean + pushAmount_CustomCheck?: (v: number) => boolean + closeAddress_CustomCheck?: (v: string) => boolean +} +export const OpenChannelRequestValidate = (o?: OpenChannelRequest, opts: OpenChannelRequestOptions = {}, path: string = 'OpenChannelRequest::root.'): Error | null => { + if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message') + if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null') + + if (typeof o.destination !== 'string') return new Error(`${path}.destination: is not a string`) + if (opts.destination_CustomCheck && !opts.destination_CustomCheck(o.destination)) return new Error(`${path}.destination: custom check failed`) + + if (typeof o.fundingAmount !== 'number') return new Error(`${path}.fundingAmount: is not a number`) + if (opts.fundingAmount_CustomCheck && !opts.fundingAmount_CustomCheck(o.fundingAmount)) return new Error(`${path}.fundingAmount: custom check failed`) + + if (typeof o.pushAmount !== 'number') return new Error(`${path}.pushAmount: is not a number`) + if (opts.pushAmount_CustomCheck && !opts.pushAmount_CustomCheck(o.pushAmount)) return new Error(`${path}.pushAmount: custom check failed`) + + if (typeof o.closeAddress !== 'string') return new Error(`${path}.closeAddress: is not a string`) + if (opts.closeAddress_CustomCheck && !opts.closeAddress_CustomCheck(o.closeAddress)) return new Error(`${path}.closeAddress: custom check failed`) return null } -export type UsageMetric = { - processed_at_ms: number - parsed_in_nano: number - auth_in_nano: number - validate_in_nano: number - handle_in_nano: number - rpc_name: string - batch: boolean - nostr: boolean - batch_size: number +export type AppsMetricsRequest = { + from_unix?: number + to_unix?: number + include_operations?: boolean } -export const UsageMetricOptionalFields: [] = [] -export type UsageMetricOptions = OptionsBaseMessage & { +export type AppsMetricsRequestOptionalField = 'from_unix' | 'to_unix' | 'include_operations' +export const AppsMetricsRequestOptionalFields: AppsMetricsRequestOptionalField[] = ['from_unix', 'to_unix', 'include_operations'] +export type AppsMetricsRequestOptions = OptionsBaseMessage & { + checkOptionalsAreSet?: AppsMetricsRequestOptionalField[] + from_unix_CustomCheck?: (v?: number) => boolean + to_unix_CustomCheck?: (v?: number) => boolean + include_operations_CustomCheck?: (v?: boolean) => boolean +} +export const AppsMetricsRequestValidate = (o?: AppsMetricsRequest, opts: AppsMetricsRequestOptions = {}, path: string = 'AppsMetricsRequest::root.'): Error | null => { + if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message') + if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null') + + if ((o.from_unix || opts.allOptionalsAreSet || opts.checkOptionalsAreSet?.includes('from_unix')) && typeof o.from_unix !== 'number') return new Error(`${path}.from_unix: is not a number`) + if (opts.from_unix_CustomCheck && !opts.from_unix_CustomCheck(o.from_unix)) return new Error(`${path}.from_unix: custom check failed`) + + if ((o.to_unix || opts.allOptionalsAreSet || opts.checkOptionalsAreSet?.includes('to_unix')) && typeof o.to_unix !== 'number') return new Error(`${path}.to_unix: is not a number`) + if (opts.to_unix_CustomCheck && !opts.to_unix_CustomCheck(o.to_unix)) return new Error(`${path}.to_unix: custom check failed`) + + if ((o.include_operations || opts.allOptionalsAreSet || opts.checkOptionalsAreSet?.includes('include_operations')) && typeof o.include_operations !== 'boolean') return new Error(`${path}.include_operations: is not a boolean`) + if (opts.include_operations_CustomCheck && !opts.include_operations_CustomCheck(o.include_operations)) return new Error(`${path}.include_operations: custom check failed`) + + return null +} + +export type RoutingEvent = { + incoming_channel_id: number + incoming_htlc_id: number + outgoing_channel_id: number + outgoing_htlc_id: number + timestamp_ns: number + event_type: string + incoming_amt_msat: number + outgoing_amt_msat: number + failure_string: string + settled: boolean + offchain: boolean + forward_fail_event: boolean +} +export const RoutingEventOptionalFields: [] = [] +export type RoutingEventOptions = OptionsBaseMessage & { checkOptionalsAreSet?: [] - processed_at_ms_CustomCheck?: (v: number) => boolean - parsed_in_nano_CustomCheck?: (v: number) => boolean - auth_in_nano_CustomCheck?: (v: number) => boolean - validate_in_nano_CustomCheck?: (v: number) => boolean - handle_in_nano_CustomCheck?: (v: number) => boolean - rpc_name_CustomCheck?: (v: string) => boolean - batch_CustomCheck?: (v: boolean) => boolean - nostr_CustomCheck?: (v: boolean) => boolean - batch_size_CustomCheck?: (v: number) => boolean + incoming_channel_id_CustomCheck?: (v: number) => boolean + incoming_htlc_id_CustomCheck?: (v: number) => boolean + outgoing_channel_id_CustomCheck?: (v: number) => boolean + outgoing_htlc_id_CustomCheck?: (v: number) => boolean + timestamp_ns_CustomCheck?: (v: number) => boolean + event_type_CustomCheck?: (v: string) => boolean + incoming_amt_msat_CustomCheck?: (v: number) => boolean + outgoing_amt_msat_CustomCheck?: (v: number) => boolean + failure_string_CustomCheck?: (v: string) => boolean + settled_CustomCheck?: (v: boolean) => boolean + offchain_CustomCheck?: (v: boolean) => boolean + forward_fail_event_CustomCheck?: (v: boolean) => boolean } -export const UsageMetricValidate = (o?: UsageMetric, opts: UsageMetricOptions = {}, path: string = 'UsageMetric::root.'): Error | null => { +export const RoutingEventValidate = (o?: RoutingEvent, opts: RoutingEventOptions = {}, path: string = 'RoutingEvent::root.'): Error | null => { if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message') if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null') - if (typeof o.processed_at_ms !== 'number') return new Error(`${path}.processed_at_ms: is not a number`) - if (opts.processed_at_ms_CustomCheck && !opts.processed_at_ms_CustomCheck(o.processed_at_ms)) return new Error(`${path}.processed_at_ms: custom check failed`) + if (typeof o.incoming_channel_id !== 'number') return new Error(`${path}.incoming_channel_id: is not a number`) + if (opts.incoming_channel_id_CustomCheck && !opts.incoming_channel_id_CustomCheck(o.incoming_channel_id)) return new Error(`${path}.incoming_channel_id: custom check failed`) - if (typeof o.parsed_in_nano !== 'number') return new Error(`${path}.parsed_in_nano: is not a number`) - if (opts.parsed_in_nano_CustomCheck && !opts.parsed_in_nano_CustomCheck(o.parsed_in_nano)) return new Error(`${path}.parsed_in_nano: custom check failed`) + if (typeof o.incoming_htlc_id !== 'number') return new Error(`${path}.incoming_htlc_id: is not a number`) + if (opts.incoming_htlc_id_CustomCheck && !opts.incoming_htlc_id_CustomCheck(o.incoming_htlc_id)) return new Error(`${path}.incoming_htlc_id: custom check failed`) - if (typeof o.auth_in_nano !== 'number') return new Error(`${path}.auth_in_nano: is not a number`) - if (opts.auth_in_nano_CustomCheck && !opts.auth_in_nano_CustomCheck(o.auth_in_nano)) return new Error(`${path}.auth_in_nano: custom check failed`) + if (typeof o.outgoing_channel_id !== 'number') return new Error(`${path}.outgoing_channel_id: is not a number`) + if (opts.outgoing_channel_id_CustomCheck && !opts.outgoing_channel_id_CustomCheck(o.outgoing_channel_id)) return new Error(`${path}.outgoing_channel_id: custom check failed`) - if (typeof o.validate_in_nano !== 'number') return new Error(`${path}.validate_in_nano: is not a number`) - if (opts.validate_in_nano_CustomCheck && !opts.validate_in_nano_CustomCheck(o.validate_in_nano)) return new Error(`${path}.validate_in_nano: custom check failed`) + if (typeof o.outgoing_htlc_id !== 'number') return new Error(`${path}.outgoing_htlc_id: is not a number`) + if (opts.outgoing_htlc_id_CustomCheck && !opts.outgoing_htlc_id_CustomCheck(o.outgoing_htlc_id)) return new Error(`${path}.outgoing_htlc_id: custom check failed`) - if (typeof o.handle_in_nano !== 'number') return new Error(`${path}.handle_in_nano: is not a number`) - if (opts.handle_in_nano_CustomCheck && !opts.handle_in_nano_CustomCheck(o.handle_in_nano)) return new Error(`${path}.handle_in_nano: custom check failed`) + if (typeof o.timestamp_ns !== 'number') return new Error(`${path}.timestamp_ns: is not a number`) + if (opts.timestamp_ns_CustomCheck && !opts.timestamp_ns_CustomCheck(o.timestamp_ns)) return new Error(`${path}.timestamp_ns: custom check failed`) - if (typeof o.rpc_name !== 'string') return new Error(`${path}.rpc_name: is not a string`) - if (opts.rpc_name_CustomCheck && !opts.rpc_name_CustomCheck(o.rpc_name)) return new Error(`${path}.rpc_name: custom check failed`) + if (typeof o.event_type !== 'string') return new Error(`${path}.event_type: is not a string`) + if (opts.event_type_CustomCheck && !opts.event_type_CustomCheck(o.event_type)) return new Error(`${path}.event_type: custom check failed`) - if (typeof o.batch !== 'boolean') return new Error(`${path}.batch: is not a boolean`) - if (opts.batch_CustomCheck && !opts.batch_CustomCheck(o.batch)) return new Error(`${path}.batch: custom check failed`) + if (typeof o.incoming_amt_msat !== 'number') return new Error(`${path}.incoming_amt_msat: is not a number`) + if (opts.incoming_amt_msat_CustomCheck && !opts.incoming_amt_msat_CustomCheck(o.incoming_amt_msat)) return new Error(`${path}.incoming_amt_msat: custom check failed`) - if (typeof o.nostr !== 'boolean') return new Error(`${path}.nostr: is not a boolean`) - if (opts.nostr_CustomCheck && !opts.nostr_CustomCheck(o.nostr)) return new Error(`${path}.nostr: custom check failed`) + if (typeof o.outgoing_amt_msat !== 'number') return new Error(`${path}.outgoing_amt_msat: is not a number`) + if (opts.outgoing_amt_msat_CustomCheck && !opts.outgoing_amt_msat_CustomCheck(o.outgoing_amt_msat)) return new Error(`${path}.outgoing_amt_msat: custom check failed`) - if (typeof o.batch_size !== 'number') return new Error(`${path}.batch_size: is not a number`) - if (opts.batch_size_CustomCheck && !opts.batch_size_CustomCheck(o.batch_size)) return new Error(`${path}.batch_size: custom check failed`) + if (typeof o.failure_string !== 'string') return new Error(`${path}.failure_string: is not a string`) + if (opts.failure_string_CustomCheck && !opts.failure_string_CustomCheck(o.failure_string)) return new Error(`${path}.failure_string: custom check failed`) + + if (typeof o.settled !== 'boolean') return new Error(`${path}.settled: is not a boolean`) + if (opts.settled_CustomCheck && !opts.settled_CustomCheck(o.settled)) return new Error(`${path}.settled: custom check failed`) + + if (typeof o.offchain !== 'boolean') return new Error(`${path}.offchain: is not a boolean`) + if (opts.offchain_CustomCheck && !opts.offchain_CustomCheck(o.offchain)) return new Error(`${path}.offchain: custom check failed`) + + if (typeof o.forward_fail_event !== 'boolean') return new Error(`${path}.forward_fail_event: is not a boolean`) + if (opts.forward_fail_event_CustomCheck && !opts.forward_fail_event_CustomCheck(o.forward_fail_event)) return new Error(`${path}.forward_fail_event: custom check failed`) return null } -export type LndNodeMetrics = { - channels_balance_events: ChannelBalanceEvent[] - chain_balance_events: ChainBalanceEvent[] - offline_channels: number - online_channels: number - pending_channels: number - closing_channels: number - open_channels: OpenChannel[] - closed_channels: ClosedChannel[] - channel_routing: ChannelRouting[] +export type ClosedChannel = { + channel_id: string + capacity: number + closed_height: number } -export const LndNodeMetricsOptionalFields: [] = [] -export type LndNodeMetricsOptions = OptionsBaseMessage & { +export const ClosedChannelOptionalFields: [] = [] +export type ClosedChannelOptions = OptionsBaseMessage & { checkOptionalsAreSet?: [] - channels_balance_events_ItemOptions?: ChannelBalanceEventOptions - channels_balance_events_CustomCheck?: (v: ChannelBalanceEvent[]) => boolean - chain_balance_events_ItemOptions?: ChainBalanceEventOptions - chain_balance_events_CustomCheck?: (v: ChainBalanceEvent[]) => boolean - offline_channels_CustomCheck?: (v: number) => boolean - online_channels_CustomCheck?: (v: number) => boolean - pending_channels_CustomCheck?: (v: number) => boolean - closing_channels_CustomCheck?: (v: number) => boolean - open_channels_ItemOptions?: OpenChannelOptions - open_channels_CustomCheck?: (v: OpenChannel[]) => boolean - closed_channels_ItemOptions?: ClosedChannelOptions - closed_channels_CustomCheck?: (v: ClosedChannel[]) => boolean - channel_routing_ItemOptions?: ChannelRoutingOptions - channel_routing_CustomCheck?: (v: ChannelRouting[]) => boolean + channel_id_CustomCheck?: (v: string) => boolean + capacity_CustomCheck?: (v: number) => boolean + closed_height_CustomCheck?: (v: number) => boolean } -export const LndNodeMetricsValidate = (o?: LndNodeMetrics, opts: LndNodeMetricsOptions = {}, path: string = 'LndNodeMetrics::root.'): Error | null => { +export const ClosedChannelValidate = (o?: ClosedChannel, opts: ClosedChannelOptions = {}, path: string = 'ClosedChannel::root.'): Error | null => { if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message') if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null') - if (!Array.isArray(o.channels_balance_events)) return new Error(`${path}.channels_balance_events: is not an array`) - for (let index = 0; index < o.channels_balance_events.length; index++) { - const channels_balance_eventsErr = ChannelBalanceEventValidate(o.channels_balance_events[index], opts.channels_balance_events_ItemOptions, `${path}.channels_balance_events[${index}]`) - if (channels_balance_eventsErr !== null) return channels_balance_eventsErr - } - if (opts.channels_balance_events_CustomCheck && !opts.channels_balance_events_CustomCheck(o.channels_balance_events)) return new Error(`${path}.channels_balance_events: custom check failed`) + if (typeof o.channel_id !== 'string') return new Error(`${path}.channel_id: is not a string`) + if (opts.channel_id_CustomCheck && !opts.channel_id_CustomCheck(o.channel_id)) return new Error(`${path}.channel_id: custom check failed`) - if (!Array.isArray(o.chain_balance_events)) return new Error(`${path}.chain_balance_events: is not an array`) - for (let index = 0; index < o.chain_balance_events.length; index++) { - const chain_balance_eventsErr = ChainBalanceEventValidate(o.chain_balance_events[index], opts.chain_balance_events_ItemOptions, `${path}.chain_balance_events[${index}]`) - if (chain_balance_eventsErr !== null) return chain_balance_eventsErr - } - if (opts.chain_balance_events_CustomCheck && !opts.chain_balance_events_CustomCheck(o.chain_balance_events)) return new Error(`${path}.chain_balance_events: custom check failed`) + if (typeof o.capacity !== 'number') return new Error(`${path}.capacity: is not a number`) + if (opts.capacity_CustomCheck && !opts.capacity_CustomCheck(o.capacity)) return new Error(`${path}.capacity: custom check failed`) - if (typeof o.offline_channels !== 'number') return new Error(`${path}.offline_channels: is not a number`) - if (opts.offline_channels_CustomCheck && !opts.offline_channels_CustomCheck(o.offline_channels)) return new Error(`${path}.offline_channels: custom check failed`) + if (typeof o.closed_height !== 'number') return new Error(`${path}.closed_height: is not a number`) + if (opts.closed_height_CustomCheck && !opts.closed_height_CustomCheck(o.closed_height)) return new Error(`${path}.closed_height: custom check failed`) - if (typeof o.online_channels !== 'number') return new Error(`${path}.online_channels: is not a number`) - if (opts.online_channels_CustomCheck && !opts.online_channels_CustomCheck(o.online_channels)) return new Error(`${path}.online_channels: custom check failed`) + return null +} - if (typeof o.pending_channels !== 'number') return new Error(`${path}.pending_channels: is not a number`) - if (opts.pending_channels_CustomCheck && !opts.pending_channels_CustomCheck(o.pending_channels)) return new Error(`${path}.pending_channels: custom check failed`) +export type AddAppRequest = { + name: string + allow_user_creation: boolean +} +export const AddAppRequestOptionalFields: [] = [] +export type AddAppRequestOptions = OptionsBaseMessage & { + checkOptionalsAreSet?: [] + name_CustomCheck?: (v: string) => boolean + allow_user_creation_CustomCheck?: (v: boolean) => boolean +} +export const AddAppRequestValidate = (o?: AddAppRequest, opts: AddAppRequestOptions = {}, path: string = 'AddAppRequest::root.'): Error | null => { + if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message') + if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null') - if (typeof o.closing_channels !== 'number') return new Error(`${path}.closing_channels: is not a number`) - if (opts.closing_channels_CustomCheck && !opts.closing_channels_CustomCheck(o.closing_channels)) return new Error(`${path}.closing_channels: custom check failed`) + if (typeof o.name !== 'string') return new Error(`${path}.name: is not a string`) + if (opts.name_CustomCheck && !opts.name_CustomCheck(o.name)) return new Error(`${path}.name: custom check failed`) - if (!Array.isArray(o.open_channels)) return new Error(`${path}.open_channels: is not an array`) - for (let index = 0; index < o.open_channels.length; index++) { - const open_channelsErr = OpenChannelValidate(o.open_channels[index], opts.open_channels_ItemOptions, `${path}.open_channels[${index}]`) - if (open_channelsErr !== null) return open_channelsErr - } - if (opts.open_channels_CustomCheck && !opts.open_channels_CustomCheck(o.open_channels)) return new Error(`${path}.open_channels: custom check failed`) + if (typeof o.allow_user_creation !== 'boolean') return new Error(`${path}.allow_user_creation: is not a boolean`) + if (opts.allow_user_creation_CustomCheck && !opts.allow_user_creation_CustomCheck(o.allow_user_creation)) return new Error(`${path}.allow_user_creation: custom check failed`) - if (!Array.isArray(o.closed_channels)) return new Error(`${path}.closed_channels: is not an array`) - for (let index = 0; index < o.closed_channels.length; index++) { - const closed_channelsErr = ClosedChannelValidate(o.closed_channels[index], opts.closed_channels_ItemOptions, `${path}.closed_channels[${index}]`) - if (closed_channelsErr !== null) return closed_channelsErr - } - if (opts.closed_channels_CustomCheck && !opts.closed_channels_CustomCheck(o.closed_channels)) return new Error(`${path}.closed_channels: custom check failed`) + return null +} - if (!Array.isArray(o.channel_routing)) return new Error(`${path}.channel_routing: is not an array`) - for (let index = 0; index < o.channel_routing.length; index++) { - const channel_routingErr = ChannelRoutingValidate(o.channel_routing[index], opts.channel_routing_ItemOptions, `${path}.channel_routing[${index}]`) - if (channel_routingErr !== null) return channel_routingErr - } - if (opts.channel_routing_CustomCheck && !opts.channel_routing_CustomCheck(o.channel_routing)) return new Error(`${path}.channel_routing: custom check failed`) +export type ClosureMigration = { + closes_at_unix: number +} +export const ClosureMigrationOptionalFields: [] = [] +export type ClosureMigrationOptions = OptionsBaseMessage & { + checkOptionalsAreSet?: [] + closes_at_unix_CustomCheck?: (v: number) => boolean +} +export const ClosureMigrationValidate = (o?: ClosureMigration, opts: ClosureMigrationOptions = {}, path: string = 'ClosureMigration::root.'): Error | null => { + if (opts.checkOptionalsAreSet && opts.allOptionalsAreSet) return new Error(path + ': only one of checkOptionalsAreSet or allOptionalNonDefault can be set for each message') + if (typeof o !== 'object' || o === null) return new Error(path + ': object is not an instance of an object or is null') + + if (typeof o.closes_at_unix !== 'number') return new Error(`${path}.closes_at_unix: is not a number`) + if (opts.closes_at_unix_CustomCheck && !opts.closes_at_unix_CustomCheck(o.closes_at_unix)) return new Error(`${path}.closes_at_unix: custom check failed`) return null } diff --git a/proto/service/structs.proto b/proto/service/structs.proto index 963a13e21..2fe866cbc 100644 --- a/proto/service/structs.proto +++ b/proto/service/structs.proto @@ -302,7 +302,6 @@ message PayInvoiceResponse{ string operation_id = 3; int64 service_fee = 4; int64 network_fee = 5; - int64 latest_balance = 6; } message OpenChannelRequest{ @@ -417,7 +416,6 @@ message GetProductBuyLinkResponse { message LiveUserOperation { UserOperation operation = 1; - int64 latest_balance = 2; } message MigrationUpdate { optional ClosureMigration closure = 1; diff --git a/src/services/main/index.ts b/src/services/main/index.ts index 30c8cc2b3..c5c80e362 100644 --- a/src/services/main/index.ts +++ b/src/services/main/index.ts @@ -227,7 +227,7 @@ export default class { getLogger({ appName: app.name })("cannot notify user, not a nostr user") return } - const message: Types.LiveUserOperation & { requestId: string, status: 'OK' } = { operation: op, latest_balance: user.user.balance_sats, requestId: "GetLiveUserOperations", status: 'OK' } + const message: Types.LiveUserOperation & { requestId: string, status: 'OK' } = { operation: op, requestId: "GetLiveUserOperations", status: 'OK' } this.nostrSend({ type: 'app', appId: app.app_id }, { type: 'content', content: JSON.stringify(message), pub: user.nostr_public_key }) } diff --git a/src/services/main/liquidityProvider.ts b/src/services/main/liquidityProvider.ts index a3b7a94b1..49368c628 100644 --- a/src/services/main/liquidityProvider.ts +++ b/src/services/main/liquidityProvider.ts @@ -28,9 +28,9 @@ export class LiquidityProvider { queue: ((state: 'ready') => void)[] = [] utils: Utils pendingPayments: Record = {} - updateProviderBalance: (balance: number) => Promise + incrementProviderBalance: (balance: number) => Promise // make the sub process accept client - constructor(pubDestination: string, utils: Utils, invoicePaidCb: InvoicePaidCb, updateProviderBalance: (balance: number) => Promise) { + constructor(pubDestination: string, utils: Utils, invoicePaidCb: InvoicePaidCb, incrementProviderBalance: (balance: number) => Promise) { this.utils = utils if (!pubDestination) { this.log("No pub provider to liquidity provider, will not be initialized") @@ -39,7 +39,7 @@ export class LiquidityProvider { this.log("connecting to liquidity provider:", pubDestination) this.pubDestination = pubDestination this.invoicePaidCb = invoicePaidCb - this.updateProviderBalance = updateProviderBalance + this.incrementProviderBalance = incrementProviderBalance this.client = newNostrClient({ pubDestination: this.pubDestination, retrieveNostrUserAuth: async () => this.myPub, @@ -84,6 +84,7 @@ export class LiquidityProvider { if (res.status === 'ERROR') { return } + this.incrementProviderBalance(res.balance) this.ready = true this.queue.forEach(q => q('ready')) this.log("subbing to user operations") @@ -94,7 +95,7 @@ export class LiquidityProvider { } //this.log("got user operation", res.operation) if (res.operation.type === Types.UserOperationType.INCOMING_INVOICE) { - this.updateProviderBalance(res.latest_balance) + this.incrementProviderBalance(res.operation.amount) this.invoicePaidCb(res.operation.identifier, res.operation.amount, 'provider') } }) @@ -192,8 +193,8 @@ export class LiquidityProvider { this.log("error paying invoice", res.reason) throw new Error(res.reason) } - - this.updateProviderBalance(userInfo.balance).then(() => { delete this.pendingPayments[invoice] }) + const totalPaid = res.amount_paid + res.network_fee + res.service_fee + this.incrementProviderBalance(-totalPaid).then(() => { delete this.pendingPayments[invoice] }) this.utils.stateBundler.AddTxPoint('paidAnInvoice', decodedAmount, { used: 'provider', from, timeDiscount: true }) return res } catch (err) { diff --git a/src/services/main/paymentManager.ts b/src/services/main/paymentManager.ts index 26fc32abc..8cfc56b0b 100644 --- a/src/services/main/paymentManager.ts +++ b/src/services/main/paymentManager.ts @@ -195,7 +195,6 @@ export default class { operation_id: `${Types.UserOperationType.OUTGOING_INVOICE}-${paymentInfo.serialId}`, network_fee: paymentInfo.networkFee, service_fee: serviceFee, - latest_balance: user.balance_sats } } diff --git a/src/services/main/rugPullTracker.ts b/src/services/main/rugPullTracker.ts index c76ba0cda..69f47126b 100644 --- a/src/services/main/rugPullTracker.ts +++ b/src/services/main/rugPullTracker.ts @@ -57,7 +57,7 @@ export class RugPullTracker { this.rugPulled = false if (providerTracker.latest_distruption_at_unix !== 0) { await this.storage.liquidityStorage.UpdateTrackedProviderDisruption('lnPub', pubDst, 0) - getLogger({ component: 'rugPull' })("rugpull from: ", pubDst, "cleared after: ", (Date.now() / 1000) - providerTracker.latest_distruption_at_unix, "seconds") + getLogger({ component: 'rugPull' })("rugpull from: ", pubDst, "cleared after: ", Math.floor(Date.now() / 1000) - providerTracker.latest_distruption_at_unix, "seconds") } if (diff > 0) { this.log("detected excees from: ", pubDst, "provider balance changed from", providerTracker.latest_balance, "to", trackedBalance, "gaining", diff) diff --git a/src/services/main/watchdog.ts b/src/services/main/watchdog.ts index 585f5adc8..a534505a0 100644 --- a/src/services/main/watchdog.ts +++ b/src/services/main/watchdog.ts @@ -74,7 +74,7 @@ export class Watchdog { this.accumulatedHtlcFees = 0 this.interval = setInterval(() => { - if (this.latestCheckStart + (1000 * 60) < Date.now()) { + if (this.latestCheckStart + (1000 * 58) < Date.now()) { this.PaymentRequested() } }, 1000 * 60) @@ -160,7 +160,7 @@ export class Watchdog { } else { if (tracker.latest_distruption_at_unix !== 0) { await this.storage.liquidityStorage.UpdateTrackedProviderDisruption('lnd', this.lndPubKey, 0) - getLogger({ component: 'bark' })("loss cleared after: ", (Date.now() / 1000) - tracker.latest_distruption_at_unix, "seconds") + getLogger({ component: 'bark' })("loss cleared after: ", Math.floor(Date.now() / 1000) - tracker.latest_distruption_at_unix, "seconds") } else if (absoluteDiff > 0) { this.log("lnd balance increased more than users balance by", absoluteDiff) } diff --git a/src/services/storage/liquidityStorage.ts b/src/services/storage/liquidityStorage.ts index e8d473058..d93f77b3d 100644 --- a/src/services/storage/liquidityStorage.ts +++ b/src/services/storage/liquidityStorage.ts @@ -50,6 +50,14 @@ export class LiquidityStorage { console.log("updating tracked balance:", latestBalance) return this.DB.getRepository(TrackedProvider).update({ provider_pubkey: pub, provider_type: providerType }, { latest_balance: latestBalance }) } + async IncrementTrackedProviderBalance(providerType: 'lnd' | 'lnPub', pub: string, amount: number) { + if (amount < 0) { + return this.DB.getRepository(TrackedProvider).increment({ provider_pubkey: pub, provider_type: providerType }, "latest_balance", amount) + } else { + return this.DB.getRepository(TrackedProvider).decrement({ provider_pubkey: pub, provider_type: providerType }, "latest_balance", -amount) + } + + } async UpdateTrackedProviderDisruption(providerType: 'lnd' | 'lnPub', pub: string, latestDisruptionAtUnix: number) { return this.DB.getRepository(TrackedProvider).update({ provider_pubkey: pub, provider_type: providerType }, { latest_distruption_at_unix: latestDisruptionAtUnix }) }