diff --git a/proto/autogenerated/client.md b/proto/autogenerated/client.md index 719af958..905b99b5 100644 --- a/proto/autogenerated/client.md +++ b/proto/autogenerated/client.md @@ -13,6 +13,11 @@ The nostr server will send back a message response, and inside the body there wi ## NOSTR Methods ### These are the nostr methods the client implements to communicate with the API via nostr +- UserHealth + - auth type: __User__ + - This methods has an __empty__ __request__ body + - This methods has an __empty__ __response__ body + - GetUserInfo - auth type: __User__ - This methods has an __empty__ __request__ body @@ -313,6 +318,13 @@ The nostr server will send back a message response, and inside the body there wi - input: [SetMockAppBalanceRequest](#SetMockAppBalanceRequest) - This methods has an __empty__ __response__ body +- UserHealth + - auth type: __User__ + - http method: __post__ + - http route: __/api/user/health__ + - This methods has an __empty__ __request__ body + - This methods has an __empty__ __response__ body + - GetUserInfo - auth type: __User__ - http method: __post__ @@ -432,16 +444,51 @@ 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 +<<<<<<< HEAD ### OpenChannelResponse - __channelId__: _string_ ### HandleLnurlPayResponse - __pr__: _string_ - __routes__: ARRAY of: _[Empty](#Empty)_ +======= +### DecodeInvoiceRequest + - __invoice__: _string_ + +### ChannelBalanceEvent + - __block_height__: _number_ + - __channel_id__: _string_ + - __local_balance_sats__: _number_ + - __remote_balance_sats__: _number_ + +### NewInvoiceRequest + - __amountSats__: _number_ + - __memo__: _string_ + +### GetUserOperationsRequest + - __latestIncomingInvoice__: _number_ + - __latestOutgoingInvoice__: _number_ + - __latestIncomingTx__: _number_ + - __latestOutgoingTx__: _number_ + - __latestIncomingUserToUserPayment__: _number_ + - __latestOutgoingUserToUserPayment__: _number_ + +### UserOperation + - __paidAtUnix__: _number_ + - __type__: _[UserOperationType](#UserOperationType)_ + - __inbound__: _boolean_ + - __amount__: _number_ + - __identifier__: _string_ + - __operationId__: _string_ + - __service_fee__: _number_ + - __network_fee__: _number_ + - __confirmed__: _boolean_ +>>>>>>> master ### NewAddressRequest - __addressType__: _[AddressType](#AddressType)_ +<<<<<<< HEAD ### UsageMetric - __processed_at_ms__: _number_ - __parsed_in_nano__: _number_ @@ -452,6 +499,188 @@ The nostr server will send back a message response, and inside the body there wi - __batch__: _boolean_ - __nostr__: _boolean_ - __batch_size__: _number_ +======= +### OpenChannelRequest + - __destination__: _string_ + - __fundingAmount__: _number_ + - __pushAmount__: _number_ + - __closeAddress__: _string_ + +### OpenChannelResponse + - __channelId__: _string_ + +### GetAppUserLNURLInfoRequest + - __user_identifier__: _string_ + - __base_url_override__: _string_ + +### LndGetInfoRequest + - __nodeId__: _number_ + +### AuthAppRequest + - __name__: _string_ + - __allow_user_creation__: _boolean_ *this field is optional + +### AppUser + - __identifier__: _string_ + - __info__: _[UserInfo](#UserInfo)_ + - __max_withdrawable__: _number_ + +### LnurlLinkResponse + - __lnurl__: _string_ + - __k1__: _string_ + +### UsersInfo + - __total__: _number_ + - __no_balance__: _number_ + - __negative_balance__: _number_ + - __always_been_inactive__: _number_ + - __balance_avg__: _number_ + - __balance_median__: _number_ + +### SetMockAppBalanceRequest + - __amount__: _number_ + +### PayInvoiceRequest + - __invoice__: _string_ + - __amount__: _number_ + +### ChainBalanceEvent + - __block_height__: _number_ + - __confirmed_balance__: _number_ + - __unconfirmed_balance__: _number_ + - __total_balance__: _number_ + +### LnurlPayInfoResponse + - __tag__: _string_ + - __callback__: _string_ + - __maxSendable__: _number_ + - __minSendable__: _number_ + - __metadata__: _string_ + - __allowsNostr__: _boolean_ + - __nostrPubkey__: _string_ + +### SendAppUserToAppUserPaymentRequest + - __from_user_identifier__: _string_ + - __to_user_identifier__: _string_ + - __amount__: _number_ + +### OpenChannel + - __channel_id__: _string_ + - __capacity__: _number_ + - __active__: _boolean_ + - __lifetime__: _number_ + - __local_balance__: _number_ + - __remote_balance__: _number_ + +### AppMetrics + - __app__: _[Application](#Application)_ + - __users__: _[UsersInfo](#UsersInfo)_ + - __total_received__: _number_ + - __total_spent__: _number_ + - __total_available__: _number_ + - __unpaid_invoices__: _number_ + - __operations__: ARRAY of: _[UserOperation](#UserOperation)_ + +### AppsMetrics + - __apps__: ARRAY of: _[AppMetrics](#AppMetrics)_ + +### LndMetricsRequest + - __from_unix__: _number_ *this field is optional + - __to_unix__: _number_ *this field is optional + +### AuthApp + - __app__: _[Application](#Application)_ + - __auth_token__: _string_ + +### SetMockAppUserBalanceRequest + - __user_identifier__: _string_ + - __amount__: _number_ + +### EncryptionExchangeRequest + - __publicKey__: _string_ + - __deviceId__: _string_ + +### NewAddressResponse + - __address__: _string_ + +### GetProductBuyLinkResponse + - __link__: _string_ + +### SendAppUserToAppPaymentRequest + - __from_user_identifier__: _string_ + - __amount__: _number_ + +### PayInvoiceResponse + - __preimage__: _string_ + - __amount_paid__: _number_ + - __operation_id__: _string_ + - __service_fee__: _number_ + - __network_fee__: _number_ + +### UserInfo + - __userId__: _string_ + - __balance__: _number_ + - __max_withdrawable__: _number_ + - __user_identifier__: _string_ + +### AddProductRequest + - __name__: _string_ + - __price_sats__: _number_ + +### DecodeInvoiceResponse + - __amount__: _number_ + +### AppsMetricsRequest + - __from_unix__: _number_ *this field is optional + - __to_unix__: _number_ *this field is optional + - __include_operations__: _boolean_ *this field is optional + +### ClosedChannel + - __channel_id__: _string_ + - __capacity__: _number_ + - __closed_height__: _number_ + +### AddAppRequest + - __name__: _string_ + - __allow_user_creation__: _boolean_ + +### Application + - __name__: _string_ + - __id__: _string_ + - __balance__: _number_ + - __npub__: _string_ + +### AddAppUserInvoiceRequest + - __receiver_identifier__: _string_ + - __payer_identifier__: _string_ + - __http_callback_url__: _string_ + - __invoice_req__: _[NewInvoiceRequest](#NewInvoiceRequest)_ + +### GetAppUserRequest + - __user_identifier__: _string_ + +### UsageMetrics + - __metrics__: ARRAY of: _[UsageMetric](#UsageMetric)_ + +### LndGetInfoResponse + - __alias__: _string_ + +### LnurlWithdrawInfoResponse + - __tag__: _string_ + - __callback__: _string_ + - __k1__: _string_ + - __defaultDescription__: _string_ + - __minWithdrawable__: _number_ + - __maxWithdrawable__: _number_ + - __balanceCheck__: _string_ + - __payLink__: _string_ + +### MigrationUpdate + - __closure__: _[ClosureMigration](#ClosureMigration)_ *this field is optional + - __relays__: _[RelaysMigration](#RelaysMigration)_ *this field is optional + +### Empty +>>>>>>> master ### RoutingEvent - __incoming_channel_id__: _number_ @@ -467,9 +696,12 @@ The nostr server will send back a message response, and inside the body there wi - __offchain__: _boolean_ - __forward_fail_event__: _boolean_ -### LndGetInfoRequest - - __nodeId__: _number_ +### AddAppInvoiceRequest + - __payer_identifier__: _string_ + - __http_callback_url__: _string_ + - __invoice_req__: _[NewInvoiceRequest](#NewInvoiceRequest)_ +<<<<<<< HEAD ### GetUserOperationsRequest - __latestIncomingInvoice__: _number_ - __latestOutgoingInvoice__: _number_ @@ -481,13 +713,73 @@ The nostr server will send back a message response, and inside the body there wi ### EncryptionExchangeRequest - __publicKey__: _string_ - __deviceId__: _string_ +======= +### NewInvoiceResponse + - __invoice__: _string_ -### ChainBalanceEvent - - __block_height__: _number_ - - __confirmed_balance__: _number_ - - __unconfirmed_balance__: _number_ - - __total_balance__: _number_ +### Product + - __id__: _string_ + - __name__: _string_ + - __price_sats__: _number_ +### 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_ + +### AddAppUserRequest + - __identifier__: _string_ + - __fail_if_exists__: _boolean_ + - __balance__: _number_ + +### HandleLnurlPayResponse + - __pr__: _string_ + - __routes__: ARRAY of: _[Empty](#Empty)_ + +### GetUserOperationsResponse + - __latestOutgoingInvoiceOperations__: _[UserOperations](#UserOperations)_ + - __latestIncomingInvoiceOperations__: _[UserOperations](#UserOperations)_ + - __latestOutgoingTxOperations__: _[UserOperations](#UserOperations)_ + - __latestIncomingTxOperations__: _[UserOperations](#UserOperations)_ + - __latestOutgoingUserToUserPayemnts__: _[UserOperations](#UserOperations)_ + - __latestIncomingUserToUserPayemnts__: _[UserOperations](#UserOperations)_ + +### LiveUserOperation + - __operation__: _[UserOperation](#UserOperation)_ + +### ClosureMigration + - __closes_at_unix__: _number_ + +### RelaysMigration + - __relays__: ARRAY of: _string_ +>>>>>>> master + +### LndNodeMetrics + - __channels_balance_events__: ARRAY of: _[ChannelBalanceEvent](#ChannelBalanceEvent)_ + - __chain_balance_events__: ARRAY of: _[ChainBalanceEvent](#ChainBalanceEvent)_ + - __routing_events__: ARRAY of: _[RoutingEvent](#RoutingEvent)_ + - __offline_channels__: _number_ + - __online_channels__: _number_ + - __pending_channels__: _number_ + - __closing_channels__: _number_ + - __open_channels__: ARRAY of: _[OpenChannel](#OpenChannel)_ + - __closed_channels__: ARRAY of: _[ClosedChannel](#ClosedChannel)_ + +<<<<<<< HEAD +======= +### PayAddressResponse + - __txId__: _string_ + - __operation_id__: _string_ + - __service_fee__: _number_ + - __network_fee__: _number_ + +>>>>>>> master ### LndMetrics - __nodes__: ARRAY of: _[LndNodeMetrics](#LndNodeMetrics)_ @@ -495,6 +787,7 @@ The nostr server will send back a message response, and inside the body there wi - __app__: _[Application](#Application)_ - __auth_token__: _string_ +<<<<<<< HEAD ### AddAppInvoiceRequest - __payer_identifier__: _string_ - __http_callback_url__: _string_ @@ -545,12 +838,19 @@ The nostr server will send back a message response, and inside the body there wi ### SetMockAppUserBalanceRequest - __user_identifier__: _string_ - __amount__: _number_ +======= +### PayAddressRequest + - __address__: _string_ + - __amoutSats__: _number_ + - __satsPerVByte__: _number_ +>>>>>>> master ### UserOperations - __fromIndex__: _number_ - __toIndex__: _number_ - __operations__: ARRAY of: _[UserOperation](#UserOperation)_ +<<<<<<< HEAD ### AppMetrics - __app__: _[Application](#Application)_ - __users__: _[UsersInfo](#UsersInfo)_ @@ -732,6 +1032,11 @@ The nostr server will send back a message response, and inside the body there wi - __latestIncomingTxOperations__: _[UserOperations](#UserOperations)_ - __latestOutgoingUserToUserPayemnts__: _[UserOperations](#UserOperations)_ - __latestIncomingUserToUserPayemnts__: _[UserOperations](#UserOperations)_ +======= +### SetMockInvoiceAsPaidRequest + - __invoice__: _string_ + - __amount__: _number_ +>>>>>>> master ## Enums ### The enumerators used in the messages diff --git a/proto/autogenerated/debug.txt b/proto/autogenerated/debug.txt index 399e7891..eb9e5fe0 100644 --- a/proto/autogenerated/debug.txt +++ b/proto/autogenerated/debug.txt @@ -1,5 +1,10 @@ +<<<<<<< HEAD ([]*main.Method) (len=41 cap=64) { (*main.Method)(0xc00023c730)({ +======= +([]*main.Method) (len=42 cap=64) { + (*main.Method)(0xc0002b4730)({ +>>>>>>> master in: (main.MethodMessage) { name: (string) (len=17) "LndGetInfoRequest", hasZeroFields: (bool) false @@ -9,8 +14,13 @@ name: (string) (len=18) "LndGetInfoResponse", hasZeroFields: (bool) false }, +<<<<<<< HEAD opts: (*main.methodOptions)(0xc00007cd20)({ authType: (*main.supportedAuth)(0xc000091530)({ +======= + opts: (*main.methodOptions)(0xc00007ce40)({ + authType: (*main.supportedAuth)(0xc000209860)({ +>>>>>>> master id: (string) (len=5) "admin", name: (string) (len=5) "Admin", context: (map[string]string) (len=1) { @@ -28,7 +38,11 @@ }), serverStream: (bool) false }), +<<<<<<< HEAD (*main.Method)(0xc00023c8c0)({ +======= + (*main.Method)(0xc0002b48c0)({ +>>>>>>> master in: (main.MethodMessage) { name: (string) (len=13) "AddAppRequest", hasZeroFields: (bool) false @@ -38,8 +52,13 @@ name: (string) (len=7) "AuthApp", hasZeroFields: (bool) false }, +<<<<<<< HEAD opts: (*main.methodOptions)(0xc00007cea0)({ authType: (*main.supportedAuth)(0xc0000915c0)({ +======= + opts: (*main.methodOptions)(0xc00007d020)({ + authType: (*main.supportedAuth)(0xc0002098f0)({ +>>>>>>> master id: (string) (len=5) "admin", name: (string) (len=5) "Admin", context: (map[string]string) (len=1) { @@ -57,7 +76,11 @@ }), serverStream: (bool) false }), +<<<<<<< HEAD (*main.Method)(0xc00023c960)({ +======= + (*main.Method)(0xc0002b4960)({ +>>>>>>> master in: (main.MethodMessage) { name: (string) (len=14) "AuthAppRequest", hasZeroFields: (bool) false @@ -67,8 +90,13 @@ name: (string) (len=7) "AuthApp", hasZeroFields: (bool) false }, +<<<<<<< HEAD opts: (*main.methodOptions)(0xc00007d0e0)({ authType: (*main.supportedAuth)(0xc000091650)({ +======= + opts: (*main.methodOptions)(0xc00007d200)({ + authType: (*main.supportedAuth)(0xc000209980)({ +>>>>>>> master id: (string) (len=5) "admin", name: (string) (len=5) "Admin", context: (map[string]string) (len=1) { @@ -86,7 +114,11 @@ }), serverStream: (bool) false }), +<<<<<<< HEAD (*main.Method)(0xc00023ca00)({ +======= + (*main.Method)(0xc0002b4a00)({ +>>>>>>> master in: (main.MethodMessage) { name: (string) (len=5) "Empty", hasZeroFields: (bool) true @@ -96,8 +128,13 @@ name: (string) (len=12) "UsageMetrics", hasZeroFields: (bool) false }, +<<<<<<< HEAD opts: (*main.methodOptions)(0xc00007d260)({ authType: (*main.supportedAuth)(0xc000091860)({ +======= + opts: (*main.methodOptions)(0xc00007d380)({ + authType: (*main.supportedAuth)(0xc000209a10)({ +>>>>>>> master id: (string) (len=7) "metrics", name: (string) (len=7) "Metrics", context: (map[string]string) (len=1) { @@ -115,7 +152,11 @@ }), serverStream: (bool) false }), +<<<<<<< HEAD (*main.Method)(0xc00023caa0)({ +======= + (*main.Method)(0xc0002b4aa0)({ +>>>>>>> master in: (main.MethodMessage) { name: (string) (len=18) "AppsMetricsRequest", hasZeroFields: (bool) false @@ -125,8 +166,13 @@ name: (string) (len=11) "AppsMetrics", hasZeroFields: (bool) false }, +<<<<<<< HEAD opts: (*main.methodOptions)(0xc00007d3e0)({ authType: (*main.supportedAuth)(0xc0000918f0)({ +======= + opts: (*main.methodOptions)(0xc000352000)({ + authType: (*main.supportedAuth)(0xc000209aa0)({ +>>>>>>> master id: (string) (len=7) "metrics", name: (string) (len=7) "Metrics", context: (map[string]string) (len=1) { @@ -144,7 +190,11 @@ }), serverStream: (bool) false }), +<<<<<<< HEAD (*main.Method)(0xc00023cb40)({ +======= + (*main.Method)(0xc0002b4b40)({ +>>>>>>> master in: (main.MethodMessage) { name: (string) (len=17) "LndMetricsRequest", hasZeroFields: (bool) false @@ -154,8 +204,13 @@ name: (string) (len=10) "LndMetrics", hasZeroFields: (bool) false }, +<<<<<<< HEAD opts: (*main.methodOptions)(0xc0002a0060)({ authType: (*main.supportedAuth)(0xc000091b00)({ +======= + opts: (*main.methodOptions)(0xc000352180)({ + authType: (*main.supportedAuth)(0xc000209b30)({ +>>>>>>> master id: (string) (len=7) "metrics", name: (string) (len=7) "Metrics", context: (map[string]string) (len=1) { @@ -173,7 +228,11 @@ }), serverStream: (bool) false }), +<<<<<<< HEAD (*main.Method)(0xc00023cb90)({ +======= + (*main.Method)(0xc0002b4b90)({ +>>>>>>> master in: (main.MethodMessage) { name: (string) (len=5) "Empty", hasZeroFields: (bool) true @@ -183,8 +242,13 @@ name: (string) (len=5) "Empty", hasZeroFields: (bool) true }, +<<<<<<< HEAD opts: (*main.methodOptions)(0xc0002a01e0)({ authType: (*main.supportedAuth)(0xc000091dd0)({ +======= + opts: (*main.methodOptions)(0xc000352300)({ + authType: (*main.supportedAuth)(0xc000209bc0)({ +>>>>>>> master id: (string) (len=5) "guest", name: (string) (len=5) "Guest", context: (map[string]string) { @@ -201,7 +265,11 @@ }), serverStream: (bool) false }), +<<<<<<< HEAD (*main.Method)(0xc00023cbe0)({ +======= + (*main.Method)(0xc0002b4be0)({ +>>>>>>> master in: (main.MethodMessage) { name: (string) (len=25) "EncryptionExchangeRequest", hasZeroFields: (bool) false @@ -211,8 +279,13 @@ name: (string) (len=5) "Empty", hasZeroFields: (bool) true }, +<<<<<<< HEAD opts: (*main.methodOptions)(0xc0002a0360)({ authType: (*main.supportedAuth)(0xc0001b4000)({ +======= + opts: (*main.methodOptions)(0xc000352480)({ + authType: (*main.supportedAuth)(0xc000209c80)({ +>>>>>>> master id: (string) (len=5) "guest", name: (string) (len=5) "Guest", context: (map[string]string) { @@ -229,7 +302,11 @@ }), serverStream: (bool) false }), +<<<<<<< HEAD (*main.Method)(0xc00023cc30)({ +======= + (*main.Method)(0xc0002b4c30)({ +>>>>>>> master in: (main.MethodMessage) { name: (string) (len=27) "SetMockInvoiceAsPaidRequest", hasZeroFields: (bool) false @@ -239,8 +316,13 @@ name: (string) (len=5) "Empty", hasZeroFields: (bool) true }, +<<<<<<< HEAD opts: (*main.methodOptions)(0xc0002a0540)({ authType: (*main.supportedAuth)(0xc0001b4090)({ +======= + opts: (*main.methodOptions)(0xc000352660)({ + authType: (*main.supportedAuth)(0xc000209d10)({ +>>>>>>> master id: (string) (len=5) "guest", name: (string) (len=5) "Guest", context: (map[string]string) { @@ -257,7 +339,11 @@ }), serverStream: (bool) false }), +<<<<<<< HEAD (*main.Method)(0xc00023ccd0)({ +======= + (*main.Method)(0xc0002b4cd0)({ +>>>>>>> master in: (main.MethodMessage) { name: (string) (len=5) "Empty", hasZeroFields: (bool) true @@ -267,8 +353,13 @@ name: (string) (len=25) "LnurlWithdrawInfoResponse", hasZeroFields: (bool) false }, +<<<<<<< HEAD opts: (*main.methodOptions)(0xc0002a08a0)({ authType: (*main.supportedAuth)(0xc0001b45d0)({ +======= + opts: (*main.methodOptions)(0xc0003529c0)({ + authType: (*main.supportedAuth)(0xc000209e60)({ +>>>>>>> master id: (string) (len=5) "guest", name: (string) (len=5) "Guest", context: (map[string]string) { @@ -287,7 +378,11 @@ }), serverStream: (bool) false }), +<<<<<<< HEAD (*main.Method)(0xc00023cd70)({ +======= + (*main.Method)(0xc0002b4d70)({ +>>>>>>> master in: (main.MethodMessage) { name: (string) (len=5) "Empty", hasZeroFields: (bool) true @@ -297,8 +392,13 @@ name: (string) (len=5) "Empty", hasZeroFields: (bool) true }, +<<<<<<< HEAD opts: (*main.methodOptions)(0xc0002a0c00)({ authType: (*main.supportedAuth)(0xc0001b4c90)({ +======= + opts: (*main.methodOptions)(0xc000352d20)({ + authType: (*main.supportedAuth)(0xc000209fb0)({ +>>>>>>> master id: (string) (len=5) "guest", name: (string) (len=5) "Guest", context: (map[string]string) { @@ -318,7 +418,11 @@ }), serverStream: (bool) false }), +<<<<<<< HEAD (*main.Method)(0xc00023ce10)({ +======= + (*main.Method)(0xc0002b4e10)({ +>>>>>>> master in: (main.MethodMessage) { name: (string) (len=5) "Empty", hasZeroFields: (bool) true @@ -328,8 +432,13 @@ name: (string) (len=20) "LnurlPayInfoResponse", hasZeroFields: (bool) false }, +<<<<<<< HEAD opts: (*main.methodOptions)(0xc0002a0f60)({ authType: (*main.supportedAuth)(0xc0001b53e0)({ +======= + opts: (*main.methodOptions)(0xc000353080)({ + authType: (*main.supportedAuth)(0xc0003680f0)({ +>>>>>>> master id: (string) (len=5) "guest", name: (string) (len=5) "Guest", context: (map[string]string) { @@ -348,7 +457,11 @@ }), serverStream: (bool) false }), +<<<<<<< HEAD (*main.Method)(0xc00023ceb0)({ +======= + (*main.Method)(0xc0002b4eb0)({ +>>>>>>> master in: (main.MethodMessage) { name: (string) (len=5) "Empty", hasZeroFields: (bool) true @@ -358,8 +471,13 @@ name: (string) (len=22) "HandleLnurlPayResponse", hasZeroFields: (bool) false }, +<<<<<<< HEAD opts: (*main.methodOptions)(0xc0002a1320)({ authType: (*main.supportedAuth)(0xc0001b5770)({ +======= + opts: (*main.methodOptions)(0xc000353440)({ + authType: (*main.supportedAuth)(0xc000368240)({ +>>>>>>> master id: (string) (len=5) "guest", name: (string) (len=5) "Guest", context: (map[string]string) { @@ -381,7 +499,11 @@ }), serverStream: (bool) false }), +<<<<<<< HEAD (*main.Method)(0xc00023cf00)({ +======= + (*main.Method)(0xc0002b4f00)({ +>>>>>>> master in: (main.MethodMessage) { name: (string) (len=5) "Empty", hasZeroFields: (bool) true @@ -391,8 +513,13 @@ name: (string) (len=20) "LnurlPayInfoResponse", hasZeroFields: (bool) false }, +<<<<<<< HEAD opts: (*main.methodOptions)(0xc0002a14a0)({ authType: (*main.supportedAuth)(0xc0001b5b30)({ +======= + opts: (*main.methodOptions)(0xc0003535c0)({ + authType: (*main.supportedAuth)(0xc0003682d0)({ +>>>>>>> master id: (string) (len=5) "guest", name: (string) (len=5) "Guest", context: (map[string]string) { @@ -411,7 +538,11 @@ }), serverStream: (bool) false }), +<<<<<<< HEAD (*main.Method)(0xc00023cf50)({ +======= + (*main.Method)(0xc0002b4f50)({ +>>>>>>> master in: (main.MethodMessage) { name: (string) (len=5) "Empty", hasZeroFields: (bool) true @@ -421,8 +552,13 @@ name: (string) (len=11) "Application", hasZeroFields: (bool) false }, +<<<<<<< HEAD opts: (*main.methodOptions)(0xc0002a1620)({ authType: (*main.supportedAuth)(0xc0001b5ce0)({ +======= + opts: (*main.methodOptions)(0xc000353740)({ + authType: (*main.supportedAuth)(0xc000368360)({ +>>>>>>> master id: (string) (len=3) "app", name: (string) (len=3) "App", context: (map[string]string) (len=1) { @@ -440,7 +576,11 @@ }), serverStream: (bool) false }), +<<<<<<< HEAD (*main.Method)(0xc00023cff0)({ +======= + (*main.Method)(0xc0002b4ff0)({ +>>>>>>> master in: (main.MethodMessage) { name: (string) (len=17) "AddAppUserRequest", hasZeroFields: (bool) false @@ -450,8 +590,13 @@ name: (string) (len=7) "AppUser", hasZeroFields: (bool) false }, +<<<<<<< HEAD opts: (*main.methodOptions)(0xc0002a17a0)({ authType: (*main.supportedAuth)(0xc0001b5d70)({ +======= + opts: (*main.methodOptions)(0xc0003538c0)({ + authType: (*main.supportedAuth)(0xc0003683f0)({ +>>>>>>> master id: (string) (len=3) "app", name: (string) (len=3) "App", context: (map[string]string) (len=1) { @@ -469,7 +614,11 @@ }), serverStream: (bool) false }), +<<<<<<< HEAD (*main.Method)(0xc00023d090)({ +======= + (*main.Method)(0xc0002b5090)({ +>>>>>>> master in: (main.MethodMessage) { name: (string) (len=20) "AddAppInvoiceRequest", hasZeroFields: (bool) false @@ -479,8 +628,13 @@ name: (string) (len=18) "NewInvoiceResponse", hasZeroFields: (bool) false }, +<<<<<<< HEAD opts: (*main.methodOptions)(0xc0002a1920)({ authType: (*main.supportedAuth)(0xc0002a8000)({ +======= + opts: (*main.methodOptions)(0xc000353a40)({ + authType: (*main.supportedAuth)(0xc000368480)({ +>>>>>>> master id: (string) (len=3) "app", name: (string) (len=3) "App", context: (map[string]string) (len=1) { @@ -498,7 +652,11 @@ }), serverStream: (bool) false }), +<<<<<<< HEAD (*main.Method)(0xc00023d0e0)({ +======= + (*main.Method)(0xc0002b50e0)({ +>>>>>>> master in: (main.MethodMessage) { name: (string) (len=24) "AddAppUserInvoiceRequest", hasZeroFields: (bool) false @@ -508,8 +666,13 @@ name: (string) (len=18) "NewInvoiceResponse", hasZeroFields: (bool) false }, +<<<<<<< HEAD opts: (*main.methodOptions)(0xc0002a1b00)({ authType: (*main.supportedAuth)(0xc0002a8090)({ +======= + opts: (*main.methodOptions)(0xc000353c20)({ + authType: (*main.supportedAuth)(0xc000368510)({ +>>>>>>> master id: (string) (len=3) "app", name: (string) (len=3) "App", context: (map[string]string) (len=1) { @@ -527,7 +690,11 @@ }), serverStream: (bool) false }), +<<<<<<< HEAD (*main.Method)(0xc00023d180)({ +======= + (*main.Method)(0xc0002b5180)({ +>>>>>>> master in: (main.MethodMessage) { name: (string) (len=17) "GetAppUserRequest", hasZeroFields: (bool) false @@ -537,8 +704,13 @@ name: (string) (len=7) "AppUser", hasZeroFields: (bool) false }, +<<<<<<< HEAD opts: (*main.methodOptions)(0xc0002a1c80)({ authType: (*main.supportedAuth)(0xc0002a8120)({ +======= + opts: (*main.methodOptions)(0xc000353da0)({ + authType: (*main.supportedAuth)(0xc0003685a0)({ +>>>>>>> master id: (string) (len=3) "app", name: (string) (len=3) "App", context: (map[string]string) (len=1) { @@ -556,7 +728,11 @@ }), serverStream: (bool) false }), +<<<<<<< HEAD (*main.Method)(0xc00023d220)({ +======= + (*main.Method)(0xc0002b5220)({ +>>>>>>> master in: (main.MethodMessage) { name: (string) (len=24) "PayAppUserInvoiceRequest", hasZeroFields: (bool) false @@ -566,8 +742,13 @@ name: (string) (len=18) "PayInvoiceResponse", hasZeroFields: (bool) false }, +<<<<<<< HEAD opts: (*main.methodOptions)(0xc0002a1e00)({ authType: (*main.supportedAuth)(0xc0002a81b0)({ +======= + opts: (*main.methodOptions)(0xc000353f20)({ + authType: (*main.supportedAuth)(0xc000368630)({ +>>>>>>> master id: (string) (len=3) "app", name: (string) (len=3) "App", context: (map[string]string) (len=1) { @@ -585,7 +766,11 @@ }), serverStream: (bool) false }), +<<<<<<< HEAD (*main.Method)(0xc00023d270)({ +======= + (*main.Method)(0xc0002b5270)({ +>>>>>>> master in: (main.MethodMessage) { name: (string) (len=34) "SendAppUserToAppUserPaymentRequest", hasZeroFields: (bool) false @@ -595,8 +780,13 @@ name: (string) (len=5) "Empty", hasZeroFields: (bool) true }, +<<<<<<< HEAD opts: (*main.methodOptions)(0xc0002aa000)({ authType: (*main.supportedAuth)(0xc0002a8240)({ +======= + opts: (*main.methodOptions)(0xc000370120)({ + authType: (*main.supportedAuth)(0xc0003686c0)({ +>>>>>>> master id: (string) (len=3) "app", name: (string) (len=3) "App", context: (map[string]string) (len=1) { @@ -614,7 +804,11 @@ }), serverStream: (bool) false }), +<<<<<<< HEAD (*main.Method)(0xc00023d310)({ +======= + (*main.Method)(0xc0002b5310)({ +>>>>>>> master in: (main.MethodMessage) { name: (string) (len=30) "SendAppUserToAppPaymentRequest", hasZeroFields: (bool) false @@ -624,8 +818,13 @@ name: (string) (len=5) "Empty", hasZeroFields: (bool) true }, +<<<<<<< HEAD opts: (*main.methodOptions)(0xc0002aa180)({ authType: (*main.supportedAuth)(0xc0002a82d0)({ +======= + opts: (*main.methodOptions)(0xc0003702a0)({ + authType: (*main.supportedAuth)(0xc000368750)({ +>>>>>>> master id: (string) (len=3) "app", name: (string) (len=3) "App", context: (map[string]string) (len=1) { @@ -643,7 +842,11 @@ }), serverStream: (bool) false }), +<<<<<<< HEAD (*main.Method)(0xc00023d360)({ +======= + (*main.Method)(0xc0002b5360)({ +>>>>>>> master in: (main.MethodMessage) { name: (string) (len=26) "GetAppUserLNURLInfoRequest", hasZeroFields: (bool) false @@ -653,8 +856,13 @@ name: (string) (len=20) "LnurlPayInfoResponse", hasZeroFields: (bool) false }, +<<<<<<< HEAD opts: (*main.methodOptions)(0xc0002aa300)({ authType: (*main.supportedAuth)(0xc0002a8360)({ +======= + opts: (*main.methodOptions)(0xc000370420)({ + authType: (*main.supportedAuth)(0xc0003687e0)({ +>>>>>>> master id: (string) (len=3) "app", name: (string) (len=3) "App", context: (map[string]string) (len=1) { @@ -672,7 +880,11 @@ }), serverStream: (bool) false }), +<<<<<<< HEAD (*main.Method)(0xc00023d3b0)({ +======= + (*main.Method)(0xc0002b53b0)({ +>>>>>>> master in: (main.MethodMessage) { name: (string) (len=28) "SetMockAppUserBalanceRequest", hasZeroFields: (bool) false @@ -682,8 +894,13 @@ name: (string) (len=5) "Empty", hasZeroFields: (bool) true }, +<<<<<<< HEAD opts: (*main.methodOptions)(0xc0002aa480)({ authType: (*main.supportedAuth)(0xc0002a83f0)({ +======= + opts: (*main.methodOptions)(0xc0003705a0)({ + authType: (*main.supportedAuth)(0xc000368870)({ +>>>>>>> master id: (string) (len=3) "app", name: (string) (len=3) "App", context: (map[string]string) (len=1) { @@ -701,7 +918,11 @@ }), serverStream: (bool) false }), +<<<<<<< HEAD (*main.Method)(0xc00023d400)({ +======= + (*main.Method)(0xc0002b5400)({ +>>>>>>> master in: (main.MethodMessage) { name: (string) (len=24) "SetMockAppBalanceRequest", hasZeroFields: (bool) false @@ -711,8 +932,13 @@ name: (string) (len=5) "Empty", hasZeroFields: (bool) true }, +<<<<<<< HEAD opts: (*main.methodOptions)(0xc0002aa660)({ authType: (*main.supportedAuth)(0xc0002a8480)({ +======= + opts: (*main.methodOptions)(0xc000370780)({ + authType: (*main.supportedAuth)(0xc000368900)({ +>>>>>>> master id: (string) (len=3) "app", name: (string) (len=3) "App", context: (map[string]string) (len=1) { @@ -730,7 +956,42 @@ }), serverStream: (bool) false }), +<<<<<<< HEAD (*main.Method)(0xc00023d450)({ +======= + (*main.Method)(0xc0002b5450)({ + in: (main.MethodMessage) { + name: (string) (len=5) "Empty", + hasZeroFields: (bool) true + }, + name: (string) (len=10) "UserHealth", + out: (main.MethodMessage) { + name: (string) (len=5) "Empty", + hasZeroFields: (bool) true + }, + opts: (*main.methodOptions)(0xc000370960)({ + authType: (*main.supportedAuth)(0xc0003689c0)({ + 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" + } + }), + method: (string) (len=4) "post", + route: (main.decodedRoute) { + route: (string) (len=16) "/api/user/health", + params: ([]string) + }, + query: ([]string) , + nostr: (bool) true, + batch: (bool) false + }), + serverStream: (bool) false + }), + (*main.Method)(0xc0002b54a0)({ +>>>>>>> master in: (main.MethodMessage) { name: (string) (len=5) "Empty", hasZeroFields: (bool) true @@ -740,6 +1001,7 @@ name: (string) (len=8) "UserInfo", hasZeroFields: (bool) false }, +<<<<<<< HEAD opts: (*main.methodOptions)(0xc0002aa840)({ authType: (*main.supportedAuth)(0xc0002a8540)({ id: (string) (len=4) "user", @@ -748,6 +1010,16 @@ (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" +======= + opts: (*main.methodOptions)(0xc000370b40)({ + authType: (*main.supportedAuth)(0xc000368a50)({ + 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" +>>>>>>> master } }), method: (string) (len=4) "post", @@ -761,7 +1033,11 @@ }), serverStream: (bool) false }), +<<<<<<< HEAD (*main.Method)(0xc00023d4f0)({ +======= + (*main.Method)(0xc0002b5540)({ +>>>>>>> master in: (main.MethodMessage) { name: (string) (len=17) "AddProductRequest", hasZeroFields: (bool) false @@ -771,8 +1047,13 @@ name: (string) (len=7) "Product", hasZeroFields: (bool) false }, +<<<<<<< HEAD opts: (*main.methodOptions)(0xc0002aaa20)({ authType: (*main.supportedAuth)(0xc0002a85d0)({ +======= + opts: (*main.methodOptions)(0xc000370d20)({ + authType: (*main.supportedAuth)(0xc000368ae0)({ +>>>>>>> master id: (string) (len=4) "user", name: (string) (len=4) "User", context: (map[string]string) (len=3) { @@ -792,7 +1073,11 @@ }), serverStream: (bool) false }), +<<<<<<< HEAD (*main.Method)(0xc00023d540)({ +======= + (*main.Method)(0xc0002b5590)({ +>>>>>>> master in: (main.MethodMessage) { name: (string) (len=5) "Empty", hasZeroFields: (bool) true @@ -802,8 +1087,13 @@ name: (string) (len=18) "NewInvoiceResponse", hasZeroFields: (bool) false }, +<<<<<<< HEAD opts: (*main.methodOptions)(0xc0002aaea0)({ authType: (*main.supportedAuth)(0xc0002a86f0)({ +======= + opts: (*main.methodOptions)(0xc0003711a0)({ + authType: (*main.supportedAuth)(0xc000368c00)({ +>>>>>>> master id: (string) (len=4) "user", name: (string) (len=4) "User", context: (map[string]string) (len=3) { @@ -825,7 +1115,11 @@ }), serverStream: (bool) false }), +<<<<<<< HEAD (*main.Method)(0xc00023d590)({ +======= + (*main.Method)(0xc0002b55e0)({ +>>>>>>> master in: (main.MethodMessage) { name: (string) (len=24) "GetUserOperationsRequest", hasZeroFields: (bool) false @@ -835,8 +1129,13 @@ name: (string) (len=25) "GetUserOperationsResponse", hasZeroFields: (bool) false }, +<<<<<<< HEAD opts: (*main.methodOptions)(0xc0002ab080)({ authType: (*main.supportedAuth)(0xc0002a8780)({ +======= + opts: (*main.methodOptions)(0xc000371380)({ + authType: (*main.supportedAuth)(0xc000368c90)({ +>>>>>>> master id: (string) (len=4) "user", name: (string) (len=4) "User", context: (map[string]string) (len=3) { @@ -856,7 +1155,11 @@ }), serverStream: (bool) false }), +<<<<<<< HEAD (*main.Method)(0xc00023d630)({ +======= + (*main.Method)(0xc0002b5680)({ +>>>>>>> master in: (main.MethodMessage) { name: (string) (len=17) "NewAddressRequest", hasZeroFields: (bool) false @@ -866,8 +1169,13 @@ name: (string) (len=18) "NewAddressResponse", hasZeroFields: (bool) false }, +<<<<<<< HEAD opts: (*main.methodOptions)(0xc0002ab260)({ authType: (*main.supportedAuth)(0xc0002a8810)({ +======= + opts: (*main.methodOptions)(0xc000371560)({ + authType: (*main.supportedAuth)(0xc000368d20)({ +>>>>>>> master id: (string) (len=4) "user", name: (string) (len=4) "User", context: (map[string]string) (len=3) { @@ -887,7 +1195,11 @@ }), serverStream: (bool) false }), +<<<<<<< HEAD (*main.Method)(0xc00023d6d0)({ +======= + (*main.Method)(0xc0002b5720)({ +>>>>>>> master in: (main.MethodMessage) { name: (string) (len=17) "PayAddressRequest", hasZeroFields: (bool) false @@ -897,8 +1209,13 @@ name: (string) (len=18) "PayAddressResponse", hasZeroFields: (bool) false }, +<<<<<<< HEAD opts: (*main.methodOptions)(0xc0002ab440)({ authType: (*main.supportedAuth)(0xc0002a88a0)({ +======= + opts: (*main.methodOptions)(0xc000371740)({ + authType: (*main.supportedAuth)(0xc000368db0)({ +>>>>>>> master id: (string) (len=4) "user", name: (string) (len=4) "User", context: (map[string]string) (len=3) { @@ -918,7 +1235,11 @@ }), serverStream: (bool) false }), +<<<<<<< HEAD (*main.Method)(0xc00023d770)({ +======= + (*main.Method)(0xc0002b57c0)({ +>>>>>>> master in: (main.MethodMessage) { name: (string) (len=17) "NewInvoiceRequest", hasZeroFields: (bool) false @@ -928,8 +1249,13 @@ name: (string) (len=18) "NewInvoiceResponse", hasZeroFields: (bool) false }, +<<<<<<< HEAD opts: (*main.methodOptions)(0xc0002ab620)({ authType: (*main.supportedAuth)(0xc0002a8930)({ +======= + opts: (*main.methodOptions)(0xc000371920)({ + authType: (*main.supportedAuth)(0xc000368e40)({ +>>>>>>> master id: (string) (len=4) "user", name: (string) (len=4) "User", context: (map[string]string) (len=3) { @@ -949,7 +1275,11 @@ }), serverStream: (bool) false }), +<<<<<<< HEAD (*main.Method)(0xc00023d810)({ +======= + (*main.Method)(0xc0002b5860)({ +>>>>>>> master in: (main.MethodMessage) { name: (string) (len=20) "DecodeInvoiceRequest", hasZeroFields: (bool) false @@ -959,8 +1289,13 @@ name: (string) (len=21) "DecodeInvoiceResponse", hasZeroFields: (bool) false }, +<<<<<<< HEAD opts: (*main.methodOptions)(0xc0002ab800)({ authType: (*main.supportedAuth)(0xc0002a89c0)({ +======= + opts: (*main.methodOptions)(0xc000371b00)({ + authType: (*main.supportedAuth)(0xc000368ed0)({ +>>>>>>> master id: (string) (len=4) "user", name: (string) (len=4) "User", context: (map[string]string) (len=3) { @@ -980,7 +1315,11 @@ }), serverStream: (bool) false }), +<<<<<<< HEAD (*main.Method)(0xc00023d8b0)({ +======= + (*main.Method)(0xc0002b5900)({ +>>>>>>> master in: (main.MethodMessage) { name: (string) (len=17) "PayInvoiceRequest", hasZeroFields: (bool) false @@ -990,14 +1329,19 @@ name: (string) (len=18) "PayInvoiceResponse", hasZeroFields: (bool) false }, +<<<<<<< HEAD opts: (*main.methodOptions)(0xc0002ab9e0)({ authType: (*main.supportedAuth)(0xc0002a8a50)({ +======= + opts: (*main.methodOptions)(0xc000371ce0)({ + authType: (*main.supportedAuth)(0xc000368f60)({ +>>>>>>> master 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", @@ -1011,7 +1355,11 @@ }), serverStream: (bool) false }), +<<<<<<< HEAD (*main.Method)(0xc00023d950)({ +======= + (*main.Method)(0xc0002b59a0)({ +>>>>>>> master in: (main.MethodMessage) { name: (string) (len=18) "OpenChannelRequest", hasZeroFields: (bool) false @@ -1021,8 +1369,13 @@ name: (string) (len=19) "OpenChannelResponse", hasZeroFields: (bool) false }, +<<<<<<< HEAD opts: (*main.methodOptions)(0xc0002abbc0)({ authType: (*main.supportedAuth)(0xc0002a8ae0)({ +======= + opts: (*main.methodOptions)(0xc000371ec0)({ + authType: (*main.supportedAuth)(0xc000368ff0)({ +>>>>>>> master id: (string) (len=4) "user", name: (string) (len=4) "User", context: (map[string]string) (len=3) { @@ -1042,7 +1395,11 @@ }), serverStream: (bool) false }), +<<<<<<< HEAD (*main.Method)(0xc00023d9f0)({ +======= + (*main.Method)(0xc0002b5a40)({ +>>>>>>> master in: (main.MethodMessage) { name: (string) (len=5) "Empty", hasZeroFields: (bool) true @@ -1052,8 +1409,13 @@ name: (string) (len=17) "LnurlLinkResponse", hasZeroFields: (bool) false }, +<<<<<<< HEAD opts: (*main.methodOptions)(0xc0002abda0)({ authType: (*main.supportedAuth)(0xc0002a8b70)({ +======= + opts: (*main.methodOptions)(0xc0003dc0c0)({ + authType: (*main.supportedAuth)(0xc000369080)({ +>>>>>>> master id: (string) (len=4) "user", name: (string) (len=4) "User", context: (map[string]string) (len=3) { @@ -1073,7 +1435,11 @@ }), serverStream: (bool) false }), +<<<<<<< HEAD (*main.Method)(0xc00023da90)({ +======= + (*main.Method)(0xc0002b5ae0)({ +>>>>>>> master in: (main.MethodMessage) { name: (string) (len=5) "Empty", hasZeroFields: (bool) true @@ -1083,8 +1449,13 @@ name: (string) (len=17) "LnurlLinkResponse", hasZeroFields: (bool) false }, +<<<<<<< HEAD opts: (*main.methodOptions)(0xc0002abf80)({ authType: (*main.supportedAuth)(0xc0002a8c00)({ +======= + opts: (*main.methodOptions)(0xc0003dc2a0)({ + authType: (*main.supportedAuth)(0xc000369110)({ +>>>>>>> master id: (string) (len=4) "user", name: (string) (len=4) "User", context: (map[string]string) (len=3) { @@ -1104,7 +1475,11 @@ }), serverStream: (bool) false }), +<<<<<<< HEAD (*main.Method)(0xc00023db30)({ +======= + (*main.Method)(0xc0002b5b80)({ +>>>>>>> master in: (main.MethodMessage) { name: (string) (len=5) "Empty", hasZeroFields: (bool) true @@ -1114,8 +1489,13 @@ name: (string) (len=17) "LnurlLinkResponse", hasZeroFields: (bool) false }, +<<<<<<< HEAD opts: (*main.methodOptions)(0xc0002ae180)({ authType: (*main.supportedAuth)(0xc0002a8c90)({ +======= + opts: (*main.methodOptions)(0xc0003dc480)({ + authType: (*main.supportedAuth)(0xc0003691a0)({ +>>>>>>> master id: (string) (len=4) "user", name: (string) (len=4) "User", context: (map[string]string) (len=3) { @@ -1135,7 +1515,11 @@ }), serverStream: (bool) false }), +<<<<<<< HEAD (*main.Method)(0xc00023dbd0)({ +======= + (*main.Method)(0xc0002b5c20)({ +>>>>>>> master in: (main.MethodMessage) { name: (string) (len=5) "Empty", hasZeroFields: (bool) true @@ -1145,6 +1529,7 @@ name: (string) (len=17) "LiveUserOperation", hasZeroFields: (bool) false }, +<<<<<<< HEAD opts: (*main.methodOptions)(0xc0002ae360)({ authType: (*main.supportedAuth)(0xc0002a8d20)({ id: (string) (len=4) "user", @@ -1153,6 +1538,16 @@ (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" +======= + opts: (*main.methodOptions)(0xc0003dc660)({ + authType: (*main.supportedAuth)(0xc000369230)({ + 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" +>>>>>>> master } }), method: (string) (len=4) "post", @@ -1166,7 +1561,11 @@ }), serverStream: (bool) true }), +<<<<<<< HEAD (*main.Method)(0xc00023dc70)({ +======= + (*main.Method)(0xc0002b5cc0)({ +>>>>>>> master in: (main.MethodMessage) { name: (string) (len=5) "Empty", hasZeroFields: (bool) true @@ -1176,8 +1575,13 @@ name: (string) (len=15) "MigrationUpdate", hasZeroFields: (bool) false }, +<<<<<<< HEAD opts: (*main.methodOptions)(0xc0002ae540)({ authType: (*main.supportedAuth)(0xc0002a8db0)({ +======= + opts: (*main.methodOptions)(0xc0003dc840)({ + authType: (*main.supportedAuth)(0xc0003692c0)({ +>>>>>>> master id: (string) (len=4) "user", name: (string) (len=4) "User", context: (map[string]string) (len=3) { @@ -1197,7 +1601,11 @@ }), serverStream: (bool) true }), +<<<<<<< HEAD (*main.Method)(0xc00023dcc0)({ +======= + (*main.Method)(0xc0002b5d10)({ +>>>>>>> master in: (main.MethodMessage) { name: (string) (len=5) "Empty", hasZeroFields: (bool) true @@ -1207,6 +1615,7 @@ name: (string) (len=5) "Empty", hasZeroFields: (bool) true }, +<<<<<<< HEAD opts: (*main.methodOptions)(0xc0002ae780)({ authType: (*main.supportedAuth)(0xc0002a8e70)({ id: (string) (len=4) "user", @@ -1215,6 +1624,16 @@ (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" +======= + opts: (*main.methodOptions)(0xc0003dca80)({ + authType: (*main.supportedAuth)(0xc000369380)({ + 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" +>>>>>>> master } }), method: (string) (len=4) "post", @@ -1231,7 +1650,11 @@ } ([]*main.Enum) (len=2 cap=2) { +<<<<<<< HEAD (*main.Enum)(0xc00071be60)({ +======= + (*main.Enum)(0xc000208f30)({ +>>>>>>> master name: (string) (len=11) "AddressType", values: ([]main.EnumValue) (len=3 cap=4) { (main.EnumValue) { @@ -1248,7 +1671,11 @@ } } }), +<<<<<<< HEAD (*main.Enum)(0xc00071bec0)({ +======= + (*main.Enum)(0xc000208f90)({ +>>>>>>> master name: (string) (len=17) "UserOperationType", values: ([]main.EnumValue) (len=6 cap=8) { (main.EnumValue) { @@ -1279,6 +1706,7 @@ }) } +<<<<<<< HEAD (map[string]*main.Message) (len=60) { (string) (len=28) "SetMockAppUserBalanceRequest": (*main.Message)(0xc0001cbb40)({ fullName: (string) (len=28) "SetMockAppUserBalanceRequest", @@ -1286,6 +1714,132 @@ fields: ([]*main.Field) (len=2 cap=2) { (*main.Field)(0xc00033bc50)({ name: (string) (len=15) "user_identifier", +======= +(map[string]*main.Message) (len=62) { + (string) (len=16) "ClosureMigration": (*main.Message)(0xc000038d00)({ + fullName: (string) (len=16) "ClosureMigration", + name: (string) (len=16) "ClosureMigration", + fields: ([]*main.Field) (len=1 cap=1) { + (*main.Field)(0xc000208ea0)({ + name: (string) (len=14) "closes_at_unix", + 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)(0xc000038d40)({ + fullName: (string) (len=15) "RelaysMigration", + name: (string) (len=15) "RelaysMigration", + fields: ([]*main.Field) (len=1 cap=1) { + (*main.Field)(0xc000208ed0)({ + name: (string) (len=6) "relays", + kind: (string) (len=6) "string", + isMap: (bool) false, + isArray: (bool) true, + isEnum: (bool) false, + isMessage: (bool) false, + isOptional: (bool) false + }) + } + }), + (string) (len=14) "LndNodeMetrics": (*main.Message)(0xc000243880)({ + fullName: (string) (len=14) "LndNodeMetrics", + name: (string) (len=14) "LndNodeMetrics", + fields: ([]*main.Field) (len=9 cap=16) { + (*main.Field)(0xc0001d9590)({ + name: (string) (len=23) "channels_balance_events", + kind: (string) (len=19) "ChannelBalanceEvent", + isMap: (bool) false, + isArray: (bool) true, + isEnum: (bool) false, + isMessage: (bool) true, + isOptional: (bool) false + }), + (*main.Field)(0xc0001d95c0)({ + name: (string) (len=20) "chain_balance_events", + kind: (string) (len=17) "ChainBalanceEvent", + isMap: (bool) false, + isArray: (bool) true, + isEnum: (bool) false, + isMessage: (bool) true, + isOptional: (bool) false + }), + (*main.Field)(0xc0001d95f0)({ + name: (string) (len=14) "routing_events", + kind: (string) (len=12) "RoutingEvent", + isMap: (bool) false, + isArray: (bool) true, + isEnum: (bool) false, + isMessage: (bool) true, + isOptional: (bool) false + }), + (*main.Field)(0xc0001d9620)({ + name: (string) (len=16) "offline_channels", + kind: (string) (len=5) "int64", + isMap: (bool) false, + isArray: (bool) false, + isEnum: (bool) false, + isMessage: (bool) false, + isOptional: (bool) false + }), + (*main.Field)(0xc0001d9650)({ + name: (string) (len=15) "online_channels", + kind: (string) (len=5) "int64", + isMap: (bool) false, + isArray: (bool) false, + isEnum: (bool) false, + isMessage: (bool) false, + isOptional: (bool) false + }), + (*main.Field)(0xc0001d9680)({ + name: (string) (len=16) "pending_channels", + kind: (string) (len=5) "int64", + isMap: (bool) false, + isArray: (bool) false, + isEnum: (bool) false, + isMessage: (bool) false, + isOptional: (bool) false + }), + (*main.Field)(0xc0001d96b0)({ + name: (string) (len=16) "closing_channels", + kind: (string) (len=5) "int64", + isMap: (bool) false, + isArray: (bool) false, + isEnum: (bool) false, + isMessage: (bool) false, + isOptional: (bool) false + }), + (*main.Field)(0xc0001d96e0)({ + name: (string) (len=13) "open_channels", + kind: (string) (len=11) "OpenChannel", + isMap: (bool) false, + isArray: (bool) true, + isEnum: (bool) false, + isMessage: (bool) true, + isOptional: (bool) false + }), + (*main.Field)(0xc0001d9710)({ + name: (string) (len=15) "closed_channels", + kind: (string) (len=13) "ClosedChannel", + isMap: (bool) false, + isArray: (bool) true, + isEnum: (bool) false, + isMessage: (bool) true, + isOptional: (bool) false + }) + } + }), + (string) (len=17) "AddAppUserRequest": (*main.Message)(0xc000243ac0)({ + fullName: (string) (len=17) "AddAppUserRequest", + name: (string) (len=17) "AddAppUserRequest", + fields: ([]*main.Field) (len=3 cap=4) { + (*main.Field)(0xc0001d9a10)({ + name: (string) (len=10) "identifier", +>>>>>>> master kind: (string) (len=6) "string", isMap: (bool) false, isArray: (bool) false, @@ -1293,7 +1847,200 @@ isMessage: (bool) false, isOptional: (bool) false }), +<<<<<<< HEAD (*main.Field)(0xc00033bc80)({ +======= + (*main.Field)(0xc0001d9a40)({ + 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)(0xc0001d9a70)({ + 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=22) "HandleLnurlPayResponse": (*main.Message)(0xc000038740)({ + fullName: (string) (len=22) "HandleLnurlPayResponse", + name: (string) (len=22) "HandleLnurlPayResponse", + fields: ([]*main.Field) (len=2 cap=2) { + (*main.Field)(0xc000208750)({ + 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)(0xc000208780)({ + 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=25) "GetUserOperationsResponse": (*main.Message)(0xc000038ac0)({ + fullName: (string) (len=25) "GetUserOperationsResponse", + name: (string) (len=25) "GetUserOperationsResponse", + fields: ([]*main.Field) (len=6 cap=8) { + (*main.Field)(0xc000208bd0)({ + 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)(0xc000208c00)({ + 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)(0xc000208c30)({ + 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)(0xc000208c60)({ + 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)(0xc000208c90)({ + 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)(0xc000208cc0)({ + 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=17) "LiveUserOperation": (*main.Message)(0xc000038bc0)({ + fullName: (string) (len=17) "LiveUserOperation", + name: (string) (len=17) "LiveUserOperation", + fields: ([]*main.Field) (len=1 cap=1) { + (*main.Field)(0xc000208e10)({ + 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=10) "LndMetrics": (*main.Message)(0xc0002438c0)({ + fullName: (string) (len=10) "LndMetrics", + name: (string) (len=10) "LndMetrics", + fields: ([]*main.Field) (len=1 cap=1) { + (*main.Field)(0xc0001d9740)({ + name: (string) (len=5) "nodes", + kind: (string) (len=14) "LndNodeMetrics", + isMap: (bool) false, + isArray: (bool) true, + isEnum: (bool) false, + isMessage: (bool) true, + isOptional: (bool) false + }) + } + }), + (string) (len=18) "PayAddressResponse": (*main.Message)(0xc000243e40)({ + fullName: (string) (len=18) "PayAddressResponse", + name: (string) (len=18) "PayAddressResponse", + fields: ([]*main.Field) (len=4 cap=4) { + (*main.Field)(0xc000208030)({ + name: (string) (len=4) "txId", + kind: (string) (len=6) "string", + isMap: (bool) false, + isArray: (bool) false, + isEnum: (bool) false, + isMessage: (bool) false, + isOptional: (bool) false + }), + (*main.Field)(0xc000208060)({ + 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)(0xc000208090)({ + 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 + }), + (*main.Field)(0xc0002080c0)({ + 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 + }) + } + }), + (string) (len=27) "SetMockInvoiceAsPaidRequest": (*main.Message)(0xc000243940)({ + fullName: (string) (len=27) "SetMockInvoiceAsPaidRequest", + name: (string) (len=27) "SetMockInvoiceAsPaidRequest", + fields: ([]*main.Field) (len=2 cap=2) { + (*main.Field)(0xc0001d97a0)({ + 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)(0xc0001d97d0)({ +>>>>>>> master name: (string) (len=6) "amount", kind: (string) (len=5) "int64", isMap: (bool) false, @@ -1304,11 +2051,28 @@ }) } }), +<<<<<<< HEAD (string) (len=20) "DecodeInvoiceRequest": (*main.Message)(0xc0001cbd40)({ fullName: (string) (len=20) "DecodeInvoiceRequest", name: (string) (len=20) "DecodeInvoiceRequest", fields: ([]*main.Field) (len=1 cap=1) { (*main.Field)(0xc00033bf20)({ +======= + (string) (len=24) "PayAppUserInvoiceRequest": (*main.Message)(0xc000243c00)({ + fullName: (string) (len=24) "PayAppUserInvoiceRequest", + name: (string) (len=24) "PayAppUserInvoiceRequest", + fields: ([]*main.Field) (len=3 cap=4) { + (*main.Field)(0xc0001d9cb0)({ + 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)(0xc0001d9ce0)({ +>>>>>>> master name: (string) (len=7) "invoice", kind: (string) (len=6) "string", isMap: (bool) false, @@ -1316,6 +2080,7 @@ isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false +<<<<<<< HEAD }) } }), @@ -1434,14 +2199,44 @@ (*main.Field)(0xc00033b890)({ name: (string) (len=4) "info", kind: (string) (len=8) "UserInfo", +======= + }), + (*main.Field)(0xc0001d9d10)({ + name: (string) (len=6) "amount", + kind: (string) (len=5) "int64", +>>>>>>> master isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, - isMessage: (bool) true, + isMessage: (bool) false, + isOptional: (bool) false + }) + } + }), + (string) (len=17) "PayAddressRequest": (*main.Message)(0xc000243e00)({ + fullName: (string) (len=17) "PayAddressRequest", + name: (string) (len=17) "PayAddressRequest", + fields: ([]*main.Field) (len=3 cap=4) { + (*main.Field)(0xc0001d9f80)({ + 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)(0xc00033b8c0)({ - name: (string) (len=16) "max_withdrawable", + (*main.Field)(0xc0001d9fb0)({ + 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)(0xc000208000)({ + name: (string) (len=12) "satsPerVByte", kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, @@ -1451,6 +2246,202 @@ }) } }), + (string) (len=14) "UserOperations": (*main.Message)(0xc000038940)({ + fullName: (string) (len=14) "UserOperations", + name: (string) (len=14) "UserOperations", + fields: ([]*main.Field) (len=3 cap=4) { + (*main.Field)(0xc000208b40)({ + name: (string) (len=9) "fromIndex", + kind: (string) (len=5) "int64", + isMap: (bool) false, + isArray: (bool) false, + isEnum: (bool) false, + isMessage: (bool) false, + isOptional: (bool) false + }), + (*main.Field)(0xc000208b70)({ + name: (string) (len=7) "toIndex", + kind: (string) (len=5) "int64", + isMap: (bool) false, + isArray: (bool) false, + isEnum: (bool) false, + isMessage: (bool) false, + isOptional: (bool) false + }), + (*main.Field)(0xc000208ba0)({ + 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 +<<<<<<< HEAD + }), + (*main.Field)(0xc00033b8c0)({ + name: (string) (len=16) "max_withdrawable", +======= + }) + } + }), + (string) (len=19) "ChannelBalanceEvent": (*main.Message)(0xc000243700)({ + fullName: (string) (len=19) "ChannelBalanceEvent", + name: (string) (len=19) "ChannelBalanceEvent", + fields: ([]*main.Field) (len=4 cap=4) { + (*main.Field)(0xc0001d9260)({ + 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)(0xc0001d9290)({ + 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)(0xc0001d92c0)({ + 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)(0xc0001d92f0)({ + name: (string) (len=19) "remote_balance_sats", + kind: (string) (len=5) "int64", + isMap: (bool) false, + isArray: (bool) false, + isEnum: (bool) false, + isMessage: (bool) false, + isOptional: (bool) false + }) + } + }), + (string) (len=20) "DecodeInvoiceRequest": (*main.Message)(0xc000243f00)({ + fullName: (string) (len=20) "DecodeInvoiceRequest", + name: (string) (len=20) "DecodeInvoiceRequest", + fields: ([]*main.Field) (len=1 cap=1) { + (*main.Field)(0xc000208180)({ + 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 + }) + } + }), + (string) (len=17) "NewAddressRequest": (*main.Message)(0xc000243d80)({ + fullName: (string) (len=17) "NewAddressRequest", + name: (string) (len=17) "NewAddressRequest", + fields: ([]*main.Field) (len=1 cap=1) { + (*main.Field)(0xc0001d9f20)({ + 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=17) "NewInvoiceRequest": (*main.Message)(0xc000243e80)({ + fullName: (string) (len=17) "NewInvoiceRequest", + name: (string) (len=17) "NewInvoiceRequest", + fields: ([]*main.Field) (len=2 cap=2) { + (*main.Field)(0xc0002080f0)({ + name: (string) (len=10) "amountSats", + kind: (string) (len=5) "int64", + isMap: (bool) false, + isArray: (bool) false, + isEnum: (bool) false, + isMessage: (bool) false, + isOptional: (bool) false + }), + (*main.Field)(0xc000208120)({ + name: (string) (len=4) "memo", + kind: (string) (len=6) "string", + isMap: (bool) false, + isArray: (bool) false, + isEnum: (bool) false, + isMessage: (bool) false, + isOptional: (bool) false + }) + } + }), + (string) (len=24) "GetUserOperationsRequest": (*main.Message)(0xc000038880)({ + fullName: (string) (len=24) "GetUserOperationsRequest", + name: (string) (len=24) "GetUserOperationsRequest", + fields: ([]*main.Field) (len=6 cap=8) { + (*main.Field)(0xc000208870)({ + 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)(0xc0002088a0)({ + 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)(0xc0002088d0)({ + 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 + }), + (*main.Field)(0xc000208900)({ + 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 + }), + (*main.Field)(0xc000208930)({ + 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)(0xc000208960)({ + name: (string) (len=31) "latestOutgoingUserToUserPayment", +>>>>>>> master + kind: (string) (len=5) "int64", + isMap: (bool) false, + isArray: (bool) false, + isEnum: (bool) false, + isMessage: (bool) false, + isOptional: (bool) false + }) + } + }), +<<<<<<< HEAD (string) (len=34) "SendAppUserToAppUserPaymentRequest": (*main.Message)(0xc0001cba80)({ fullName: (string) (len=34) "SendAppUserToAppUserPaymentRequest", name: (string) (len=34) "SendAppUserToAppUserPaymentRequest", @@ -1458,22 +2449,50 @@ (*main.Field)(0xc00033bb00)({ name: (string) (len=20) "from_user_identifier", kind: (string) (len=6) "string", +======= + (string) (len=13) "UserOperation": (*main.Message)(0xc000038900)({ + fullName: (string) (len=13) "UserOperation", + name: (string) (len=13) "UserOperation", + fields: ([]*main.Field) (len=9 cap=16) { + (*main.Field)(0xc000208990)({ + name: (string) (len=10) "paidAtUnix", + kind: (string) (len=5) "int64", +>>>>>>> master isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false }), +<<<<<<< HEAD (*main.Field)(0xc00033bb30)({ name: (string) (len=18) "to_user_identifier", kind: (string) (len=6) "string", +======= + (*main.Field)(0xc0002089c0)({ + name: (string) (len=4) "type", + kind: (string) (len=17) "UserOperationType", + isMap: (bool) false, + isArray: (bool) false, + isEnum: (bool) true, + isMessage: (bool) false, + isOptional: (bool) false + }), + (*main.Field)(0xc0002089f0)({ + name: (string) (len=7) "inbound", + kind: (string) (len=4) "bool", +>>>>>>> master isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false }), +<<<<<<< HEAD (*main.Field)(0xc00033bb60)({ +======= + (*main.Field)(0xc000208a20)({ +>>>>>>> master name: (string) (len=6) "amount", kind: (string) (len=5) "int64", isMap: (bool) false, @@ -1481,6 +2500,7 @@ isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false +<<<<<<< HEAD }) } }), @@ -1490,6 +2510,10 @@ fields: ([]*main.Field) (len=2 cap=2) { (*main.Field)(0xc00033bb90)({ name: (string) (len=20) "from_user_identifier", +======= + }), + (*main.Field)(0xc000208a50)({ + name: (string) (len=10) "identifier", kind: (string) (len=6) "string", isMap: (bool) false, isArray: (bool) false, @@ -1497,8 +2521,182 @@ isMessage: (bool) false, isOptional: (bool) false }), + (*main.Field)(0xc000208a80)({ + name: (string) (len=11) "operationId", + kind: (string) (len=6) "string", + isMap: (bool) false, + isArray: (bool) false, + isEnum: (bool) false, + isMessage: (bool) false, + isOptional: (bool) false + }), + (*main.Field)(0xc000208ab0)({ + 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 + }), + (*main.Field)(0xc000208ae0)({ + 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)(0xc000208b10)({ + 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 + }) + } + }), + (string) (len=26) "GetAppUserLNURLInfoRequest": (*main.Message)(0xc000243cc0)({ + fullName: (string) (len=26) "GetAppUserLNURLInfoRequest", + name: (string) (len=26) "GetAppUserLNURLInfoRequest", + fields: ([]*main.Field) (len=2 cap=2) { + (*main.Field)(0xc0001d9e30)({ + name: (string) (len=15) "user_identifier", +>>>>>>> master + kind: (string) (len=6) "string", + isMap: (bool) false, + isArray: (bool) false, + isEnum: (bool) false, + isMessage: (bool) false, + isOptional: (bool) false + }), +<<<<<<< HEAD (*main.Field)(0xc00033bbc0)({ name: (string) (len=6) "amount", +======= + (*main.Field)(0xc0001d9e60)({ + 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 + }) + } + }), + (string) (len=18) "OpenChannelRequest": (*main.Message)(0xc000038080)({ + fullName: (string) (len=18) "OpenChannelRequest", + name: (string) (len=18) "OpenChannelRequest", + fields: ([]*main.Field) (len=4 cap=4) { + (*main.Field)(0xc000208330)({ + 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)(0xc000208360)({ + name: (string) (len=13) "fundingAmount", + kind: (string) (len=5) "int64", + isMap: (bool) false, + isArray: (bool) false, + isEnum: (bool) false, + isMessage: (bool) false, + isOptional: (bool) false + }), + (*main.Field)(0xc000208390)({ + 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)(0xc0002083c0)({ + name: (string) (len=12) "closeAddress", + kind: (string) (len=6) "string", + isMap: (bool) false, + isArray: (bool) false, + isEnum: (bool) false, + isMessage: (bool) false, + isOptional: (bool) false + }) + } + }), + (string) (len=19) "OpenChannelResponse": (*main.Message)(0xc0000380c0)({ + fullName: (string) (len=19) "OpenChannelResponse", + name: (string) (len=19) "OpenChannelResponse", + fields: ([]*main.Field) (len=1 cap=1) { + (*main.Field)(0xc0002083f0)({ + name: (string) (len=9) "channelId", + kind: (string) (len=6) "string", + isMap: (bool) false, + isArray: (bool) false, + isEnum: (bool) false, + isMessage: (bool) false, + isOptional: (bool) false + }) + } + }), + (string) (len=9) "UsersInfo": (*main.Message)(0xc0002433c0)({ + fullName: (string) (len=9) "UsersInfo", + name: (string) (len=9) "UsersInfo", + fields: ([]*main.Field) (len=6 cap=8) { + (*main.Field)(0xc0001d8d20)({ + 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 + }), + (*main.Field)(0xc0001d8d50)({ + 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 + }), + (*main.Field)(0xc0001d8d80)({ + name: (string) (len=16) "negative_balance", + kind: (string) (len=5) "int64", + isMap: (bool) false, + isArray: (bool) false, + isEnum: (bool) false, + isMessage: (bool) false, + isOptional: (bool) false + }), + (*main.Field)(0xc0001d8db0)({ + name: (string) (len=20) "always_been_inactive", + kind: (string) (len=5) "int64", + isMap: (bool) false, + isArray: (bool) false, + isEnum: (bool) false, + isMessage: (bool) false, + isOptional: (bool) false + }), + (*main.Field)(0xc0001d8de0)({ + name: (string) (len=11) "balance_avg", + kind: (string) (len=5) "int64", + isMap: (bool) false, + isArray: (bool) false, + isEnum: (bool) false, + isMessage: (bool) false, + isOptional: (bool) false + }), + (*main.Field)(0xc0001d8e10)({ + name: (string) (len=14) "balance_median", +>>>>>>> master kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, @@ -1508,6 +2706,7 @@ }) } }), +<<<<<<< HEAD (string) (len=14) "UserOperations": (*main.Message)(0xc000038700)({ fullName: (string) (len=14) "UserOperations", name: (string) (len=14) "UserOperations", @@ -1565,16 +2764,103 @@ }), (*main.Field)(0xc00033af30)({ name: (string) (len=14) "total_received", +======= + (string) (len=17) "LndGetInfoRequest": (*main.Message)(0xc000243900)({ + fullName: (string) (len=17) "LndGetInfoRequest", + name: (string) (len=17) "LndGetInfoRequest", + fields: ([]*main.Field) (len=1 cap=1) { + (*main.Field)(0xc0001d9770)({ + name: (string) (len=6) "nodeId", +>>>>>>> master kind: (string) (len=5) "int64", isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, isMessage: (bool) false, isOptional: (bool) false +<<<<<<< HEAD }), (*main.Field)(0xc00033af60)({ name: (string) (len=11) "total_spent", kind: (string) (len=5) "int64", +======= + }) + } + }), + (string) (len=14) "AuthAppRequest": (*main.Message)(0xc000243a00)({ + fullName: (string) (len=14) "AuthAppRequest", + name: (string) (len=14) "AuthAppRequest", + fields: ([]*main.Field) (len=2 cap=2) { + (*main.Field)(0xc0001d9890)({ + 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)(0xc0001d98c0)({ + 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) true + }) + } + }), + (string) (len=7) "AppUser": (*main.Message)(0xc000243b00)({ + fullName: (string) (len=7) "AppUser", + name: (string) (len=7) "AppUser", + fields: ([]*main.Field) (len=3 cap=4) { + (*main.Field)(0xc0001d9aa0)({ + 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)(0xc0001d9ad0)({ + 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 + }), + (*main.Field)(0xc0001d9b00)({ + name: (string) (len=16) "max_withdrawable", + kind: (string) (len=5) "int64", + isMap: (bool) false, + isArray: (bool) false, + isEnum: (bool) false, + isMessage: (bool) false, + isOptional: (bool) false + }) + } + }), + (string) (len=17) "LnurlLinkResponse": (*main.Message)(0xc0000381c0)({ + fullName: (string) (len=17) "LnurlLinkResponse", + name: (string) (len=17) "LnurlLinkResponse", + fields: ([]*main.Field) (len=2 cap=2) { + (*main.Field)(0xc000208420)({ + 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)(0xc000208450)({ + name: (string) (len=2) "k1", + kind: (string) (len=6) "string", +>>>>>>> master isMap: (bool) false, isArray: (bool) false, isEnum: (bool) false, @@ -1610,11 +2896,100 @@ }) } }), +<<<<<<< HEAD (string) (len=20) "LnurlPayInfoResponse": (*main.Message)(0xc000038040)({ fullName: (string) (len=20) "LnurlPayInfoResponse", name: (string) (len=20) "LnurlPayInfoResponse", fields: ([]*main.Field) (len=7 cap=8) { (*main.Field)(0xc00071b500)({ +======= + (string) (len=17) "ChainBalanceEvent": (*main.Message)(0xc000243740)({ + fullName: (string) (len=17) "ChainBalanceEvent", + name: (string) (len=17) "ChainBalanceEvent", + fields: ([]*main.Field) (len=4 cap=4) { + (*main.Field)(0xc0001d9320)({ + 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)(0xc0001d9350)({ + 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)(0xc0001d9380)({ + 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)(0xc0001d93b0)({ + name: (string) (len=13) "total_balance", + kind: (string) (len=5) "int64", + isMap: (bool) false, + isArray: (bool) false, + isEnum: (bool) false, + isMessage: (bool) false, + isOptional: (bool) false + }) + } + }), + (string) (len=24) "SetMockAppBalanceRequest": (*main.Message)(0xc000243d40)({ + fullName: (string) (len=24) "SetMockAppBalanceRequest", + name: (string) (len=24) "SetMockAppBalanceRequest", + fields: ([]*main.Field) (len=1 cap=1) { + (*main.Field)(0xc0001d9ef0)({ + 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 + }) + } + }), + (string) (len=17) "PayInvoiceRequest": (*main.Message)(0xc000243f80)({ + fullName: (string) (len=17) "PayInvoiceRequest", + name: (string) (len=17) "PayInvoiceRequest", + fields: ([]*main.Field) (len=2 cap=2) { + (*main.Field)(0xc0002081e0)({ + 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)(0xc000208210)({ + 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 + }) + } + }), + (string) (len=20) "LnurlPayInfoResponse": (*main.Message)(0xc000038700)({ + fullName: (string) (len=20) "LnurlPayInfoResponse", + name: (string) (len=20) "LnurlPayInfoResponse", + fields: ([]*main.Field) (len=7 cap=8) { + (*main.Field)(0xc000208600)({ +>>>>>>> master name: (string) (len=3) "tag", kind: (string) (len=6) "string", isMap: (bool) false, @@ -1623,7 +2998,11 @@ isMessage: (bool) false, isOptional: (bool) false }), +<<<<<<< HEAD (*main.Field)(0xc00071b530)({ +======= + (*main.Field)(0xc000208630)({ +>>>>>>> master name: (string) (len=8) "callback", kind: (string) (len=6) "string", isMap: (bool) false, @@ -1632,7 +3011,11 @@ isMessage: (bool) false, isOptional: (bool) false }), +<<<<<<< HEAD (*main.Field)(0xc00071b560)({ +======= + (*main.Field)(0xc000208660)({ +>>>>>>> master name: (string) (len=11) "maxSendable", kind: (string) (len=5) "int64", isMap: (bool) false, @@ -1641,7 +3024,11 @@ isMessage: (bool) false, isOptional: (bool) false }), +<<<<<<< HEAD (*main.Field)(0xc00071b590)({ +======= + (*main.Field)(0xc000208690)({ +>>>>>>> master name: (string) (len=11) "minSendable", kind: (string) (len=5) "int64", isMap: (bool) false, @@ -1650,7 +3037,11 @@ isMessage: (bool) false, isOptional: (bool) false }), +<<<<<<< HEAD (*main.Field)(0xc00071b5c0)({ +======= + (*main.Field)(0xc0002086c0)({ +>>>>>>> master name: (string) (len=8) "metadata", kind: (string) (len=6) "string", isMap: (bool) false, @@ -1659,7 +3050,11 @@ isMessage: (bool) false, isOptional: (bool) false }), +<<<<<<< HEAD (*main.Field)(0xc00071b5f0)({ +======= + (*main.Field)(0xc0002086f0)({ +>>>>>>> master name: (string) (len=11) "allowsNostr", kind: (string) (len=4) "bool", isMap: (bool) false, @@ -1668,7 +3063,11 @@ isMessage: (bool) false, isOptional: (bool) false }), +<<<<<<< HEAD (*main.Field)(0xc00071b620)({ +======= + (*main.Field)(0xc000208720)({ +>>>>>>> master name: (string) (len=11) "nostrPubkey", kind: (string) (len=6) "string", isMap: (bool) false, @@ -1679,6 +3078,7 @@ }) } }), +<<<<<<< HEAD (string) (len=12) "UsageMetrics": (*main.Message)(0xc0001cb1c0)({ fullName: (string) (len=12) "UsageMetrics", name: (string) (len=12) "UsageMetrics", @@ -1733,6 +3133,14 @@ fields: ([]*main.Field) (len=2 cap=2) { (*main.Field)(0xc00033bf80)({ name: (string) (len=7) "invoice", +======= + (string) (len=11) "OpenChannel": (*main.Message)(0xc0002437c0)({ + fullName: (string) (len=11) "OpenChannel", + name: (string) (len=11) "OpenChannel", + fields: ([]*main.Field) (len=6 cap=8) { + (*main.Field)(0xc0001d93e0)({ + name: (string) (len=10) "channel_id", +>>>>>>> master kind: (string) (len=6) "string", isMap: (bool) false, isArray: (bool) false, @@ -1740,7 +3148,80 @@ isMessage: (bool) false, isOptional: (bool) false }), +<<<<<<< HEAD (*main.Field)(0xc00033bfb0)({ +======= + (*main.Field)(0xc0001d9410)({ + name: (string) (len=8) "capacity", + kind: (string) (len=5) "int64", + isMap: (bool) false, + isArray: (bool) false, + isEnum: (bool) false, + isMessage: (bool) false, + isOptional: (bool) false + }), + (*main.Field)(0xc0001d9440)({ + 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)(0xc0001d9470)({ + name: (string) (len=8) "lifetime", + kind: (string) (len=5) "int64", + isMap: (bool) false, + isArray: (bool) false, + isEnum: (bool) false, + isMessage: (bool) false, + isOptional: (bool) false + }), + (*main.Field)(0xc0001d94a0)({ + name: (string) (len=13) "local_balance", + kind: (string) (len=5) "int64", + isMap: (bool) false, + isArray: (bool) false, + isEnum: (bool) false, + isMessage: (bool) false, + isOptional: (bool) false + }), + (*main.Field)(0xc0001d94d0)({ + 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 + }) + } + }), + (string) (len=34) "SendAppUserToAppUserPaymentRequest": (*main.Message)(0xc000243c40)({ + fullName: (string) (len=34) "SendAppUserToAppUserPaymentRequest", + name: (string) (len=34) "SendAppUserToAppUserPaymentRequest", + fields: ([]*main.Field) (len=3 cap=4) { + (*main.Field)(0xc0001d9d40)({ + 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)(0xc0001d9d70)({ + 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)(0xc0001d9da0)({ +>>>>>>> master name: (string) (len=6) "amount", kind: (string) (len=5) "int64", isMap: (bool) false, @@ -1751,11 +3232,361 @@ }) } }), +<<<<<<< HEAD (string) (len=17) "AddProductRequest": (*main.Message)(0xc000038840)({ fullName: (string) (len=17) "AddProductRequest", name: (string) (len=17) "AddProductRequest", fields: ([]*main.Field) (len=2 cap=2) { (*main.Field)(0xc00071bc20)({ +======= + (string) (len=28) "SetMockAppUserBalanceRequest": (*main.Message)(0xc000243d00)({ + fullName: (string) (len=28) "SetMockAppUserBalanceRequest", + name: (string) (len=28) "SetMockAppUserBalanceRequest", + fields: ([]*main.Field) (len=2 cap=2) { + (*main.Field)(0xc0001d9e90)({ + 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)(0xc0001d9ec0)({ + 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 + }) + } + }), + (string) (len=25) "EncryptionExchangeRequest": (*main.Message)(0xc000243080)({ + fullName: (string) (len=25) "EncryptionExchangeRequest", + name: (string) (len=25) "EncryptionExchangeRequest", + fields: ([]*main.Field) (len=2 cap=2) { + (*main.Field)(0xc0001d8a50)({ + name: (string) (len=9) "publicKey", + kind: (string) (len=6) "string", + isMap: (bool) false, + isArray: (bool) false, + isEnum: (bool) false, + isMessage: (bool) false, + isOptional: (bool) false + }), + (*main.Field)(0xc0001d8a80)({ + name: (string) (len=8) "deviceId", + kind: (string) (len=6) "string", + isMap: (bool) false, + isArray: (bool) false, + isEnum: (bool) false, + isMessage: (bool) false, + isOptional: (bool) false + }) + } + }), + (string) (len=10) "AppMetrics": (*main.Message)(0xc0002434c0)({ + fullName: (string) (len=10) "AppMetrics", + name: (string) (len=10) "AppMetrics", + fields: ([]*main.Field) (len=7 cap=8) { + (*main.Field)(0xc0001d8e40)({ + 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)(0xc0001d8e70)({ + 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)(0xc0001d8ea0)({ + name: (string) (len=14) "total_received", + kind: (string) (len=5) "int64", + isMap: (bool) false, + isArray: (bool) false, + isEnum: (bool) false, + isMessage: (bool) false, + isOptional: (bool) false + }), + (*main.Field)(0xc0001d8ed0)({ + name: (string) (len=11) "total_spent", + kind: (string) (len=5) "int64", + isMap: (bool) false, + isArray: (bool) false, + isEnum: (bool) false, + isMessage: (bool) false, + isOptional: (bool) false + }), + (*main.Field)(0xc0001d8f00)({ + name: (string) (len=15) "total_available", + kind: (string) (len=5) "int64", + isMap: (bool) false, + isArray: (bool) false, + isEnum: (bool) false, + isMessage: (bool) false, + isOptional: (bool) false + }), + (*main.Field)(0xc0001d8f30)({ + name: (string) (len=15) "unpaid_invoices", + kind: (string) (len=5) "int64", + isMap: (bool) false, + isArray: (bool) false, + isEnum: (bool) false, + isMessage: (bool) false, + isOptional: (bool) false + }), + (*main.Field)(0xc0001d8f60)({ + 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=11) "AppsMetrics": (*main.Message)(0xc000243600)({ + fullName: (string) (len=11) "AppsMetrics", + name: (string) (len=11) "AppsMetrics", + fields: ([]*main.Field) (len=1 cap=1) { + (*main.Field)(0xc0001d8f90)({ + name: (string) (len=4) "apps", + kind: (string) (len=10) "AppMetrics", + isMap: (bool) false, + isArray: (bool) true, + isEnum: (bool) false, + isMessage: (bool) true, + isOptional: (bool) false + }) + } + }), + (string) (len=17) "LndMetricsRequest": (*main.Message)(0xc000243640)({ + fullName: (string) (len=17) "LndMetricsRequest", + name: (string) (len=17) "LndMetricsRequest", + fields: ([]*main.Field) (len=2 cap=2) { + (*main.Field)(0xc0001d8fc0)({ + 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) true + }), + (*main.Field)(0xc0001d8ff0)({ + 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) true + }) + } + }), + (string) (len=7) "AuthApp": (*main.Message)(0xc000243a80)({ + fullName: (string) (len=7) "AuthApp", + name: (string) (len=7) "AuthApp", + fields: ([]*main.Field) (len=2 cap=2) { + (*main.Field)(0xc0001d99b0)({ + 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)(0xc0001d99e0)({ + name: (string) (len=10) "auth_token", + kind: (string) (len=6) "string", + isMap: (bool) false, + isArray: (bool) false, + isEnum: (bool) false, + isMessage: (bool) false, + isOptional: (bool) false + }) + } + }), + (string) (len=30) "SendAppUserToAppPaymentRequest": (*main.Message)(0xc000243c80)({ + fullName: (string) (len=30) "SendAppUserToAppPaymentRequest", + name: (string) (len=30) "SendAppUserToAppPaymentRequest", + fields: ([]*main.Field) (len=2 cap=2) { + (*main.Field)(0xc0001d9dd0)({ + 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)(0xc0001d9e00)({ + 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 + }) + } + }), + (string) (len=18) "NewAddressResponse": (*main.Message)(0xc000243dc0)({ + fullName: (string) (len=18) "NewAddressResponse", + name: (string) (len=18) "NewAddressResponse", + fields: ([]*main.Field) (len=1 cap=1) { + (*main.Field)(0xc0001d9f50)({ + 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=25) "GetProductBuyLinkResponse": (*main.Message)(0xc000038b80)({ + fullName: (string) (len=25) "GetProductBuyLinkResponse", + name: (string) (len=25) "GetProductBuyLinkResponse", + fields: ([]*main.Field) (len=1 cap=1) { + (*main.Field)(0xc000208de0)({ + 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 + }) + } + }), + (string) (len=21) "DecodeInvoiceResponse": (*main.Message)(0xc000243f40)({ + fullName: (string) (len=21) "DecodeInvoiceResponse", + name: (string) (len=21) "DecodeInvoiceResponse", + fields: ([]*main.Field) (len=1 cap=1) { + (*main.Field)(0xc0002081b0)({ + 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 + }) + } + }), + (string) (len=18) "PayInvoiceResponse": (*main.Message)(0xc000038040)({ + fullName: (string) (len=18) "PayInvoiceResponse", + name: (string) (len=18) "PayInvoiceResponse", + fields: ([]*main.Field) (len=5 cap=8) { + (*main.Field)(0xc000208240)({ + name: (string) (len=8) "preimage", + kind: (string) (len=6) "string", + isMap: (bool) false, + isArray: (bool) false, + isEnum: (bool) false, + isMessage: (bool) false, + isOptional: (bool) false + }), + (*main.Field)(0xc000208270)({ + name: (string) (len=11) "amount_paid", + kind: (string) (len=5) "int64", + isMap: (bool) false, + isArray: (bool) false, + isEnum: (bool) false, + isMessage: (bool) false, + isOptional: (bool) false + }), + (*main.Field)(0xc0002082a0)({ + 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)(0xc0002082d0)({ + 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 + }), + (*main.Field)(0xc000208300)({ + 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 + }) + } + }), + (string) (len=8) "UserInfo": (*main.Message)(0xc000038800)({ + fullName: (string) (len=8) "UserInfo", + name: (string) (len=8) "UserInfo", + fields: ([]*main.Field) (len=4 cap=4) { + (*main.Field)(0xc0002087b0)({ + name: (string) (len=6) "userId", + kind: (string) (len=6) "string", + isMap: (bool) false, + isArray: (bool) false, + isEnum: (bool) false, + isMessage: (bool) false, + isOptional: (bool) false + }), + (*main.Field)(0xc0002087e0)({ + 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 + }), + (*main.Field)(0xc000208810)({ + name: (string) (len=16) "max_withdrawable", + kind: (string) (len=5) "int64", + isMap: (bool) false, + isArray: (bool) false, + isEnum: (bool) false, + isMessage: (bool) false, + isOptional: (bool) false + }), + (*main.Field)(0xc000208840)({ + 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 + }) + } + }), + (string) (len=17) "AddProductRequest": (*main.Message)(0xc000038b00)({ + fullName: (string) (len=17) "AddProductRequest", + name: (string) (len=17) "AddProductRequest", + fields: ([]*main.Field) (len=2 cap=2) { + (*main.Field)(0xc000208cf0)({ +>>>>>>> master name: (string) (len=4) "name", kind: (string) (len=6) "string", isMap: (bool) false, @@ -1764,7 +3595,619 @@ isMessage: (bool) false, isOptional: (bool) false }), +<<<<<<< HEAD (*main.Field)(0xc00071bc50)({ +======= + (*main.Field)(0xc000208d20)({ + 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 + }) + } + }), + (string) (len=24) "AddAppUserInvoiceRequest": (*main.Message)(0xc000243b80)({ + fullName: (string) (len=24) "AddAppUserInvoiceRequest", + name: (string) (len=24) "AddAppUserInvoiceRequest", + fields: ([]*main.Field) (len=4 cap=4) { + (*main.Field)(0xc0001d9bc0)({ + name: (string) (len=19) "receiver_identifier", + kind: (string) (len=6) "string", + isMap: (bool) false, + isArray: (bool) false, + isEnum: (bool) false, + isMessage: (bool) false, + isOptional: (bool) false + }), + (*main.Field)(0xc0001d9bf0)({ + 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)(0xc0001d9c20)({ + 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)(0xc0001d9c50)({ + 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) "GetAppUserRequest": (*main.Message)(0xc000243bc0)({ + fullName: (string) (len=17) "GetAppUserRequest", + name: (string) (len=17) "GetAppUserRequest", + fields: ([]*main.Field) (len=1 cap=1) { + (*main.Field)(0xc0001d9c80)({ + 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 + }) + } + }), + (string) (len=12) "UsageMetrics": (*main.Message)(0xc000243300)({ + fullName: (string) (len=12) "UsageMetrics", + name: (string) (len=12) "UsageMetrics", + fields: ([]*main.Field) (len=1 cap=1) { + (*main.Field)(0xc0001d8c60)({ + 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=18) "AppsMetricsRequest": (*main.Message)(0xc000243340)({ + fullName: (string) (len=18) "AppsMetricsRequest", + name: (string) (len=18) "AppsMetricsRequest", + fields: ([]*main.Field) (len=3 cap=4) { + (*main.Field)(0xc0001d8c90)({ + 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) true + }), + (*main.Field)(0xc0001d8cc0)({ + 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) true + }), + (*main.Field)(0xc0001d8cf0)({ + name: (string) (len=18) "include_operations", + kind: (string) (len=4) "bool", + isMap: (bool) false, + isArray: (bool) false, + isEnum: (bool) false, + isMessage: (bool) false, + isOptional: (bool) true + }) + } + }), + (string) (len=13) "ClosedChannel": (*main.Message)(0xc000243800)({ + fullName: (string) (len=13) "ClosedChannel", + name: (string) (len=13) "ClosedChannel", + fields: ([]*main.Field) (len=3 cap=4) { + (*main.Field)(0xc0001d9500)({ + 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)(0xc0001d9530)({ + name: (string) (len=8) "capacity", + kind: (string) (len=5) "int64", + isMap: (bool) false, + isArray: (bool) false, + isEnum: (bool) false, + isMessage: (bool) false, + isOptional: (bool) false + }), + (*main.Field)(0xc0001d9560)({ + 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 + }) + } + }), + (string) (len=13) "AddAppRequest": (*main.Message)(0xc0002439c0)({ + fullName: (string) (len=13) "AddAppRequest", + name: (string) (len=13) "AddAppRequest", + fields: ([]*main.Field) (len=2 cap=2) { + (*main.Field)(0xc0001d9830)({ + 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)(0xc0001d9860)({ + 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 + }) + } + }), + (string) (len=11) "Application": (*main.Message)(0xc000243a40)({ + fullName: (string) (len=11) "Application", + name: (string) (len=11) "Application", + fields: ([]*main.Field) (len=4 cap=4) { + (*main.Field)(0xc0001d98f0)({ + 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)(0xc0001d9920)({ + 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)(0xc0001d9950)({ + 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 + }), + (*main.Field)(0xc0001d9980)({ + 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=5) "Empty": (*main.Message)(0xc000243040)({ + fullName: (string) (len=5) "Empty", + name: (string) (len=5) "Empty", + fields: ([]*main.Field) + }), + (string) (len=18) "LndGetInfoResponse": (*main.Message)(0xc000243980)({ + fullName: (string) (len=18) "LndGetInfoResponse", + name: (string) (len=18) "LndGetInfoResponse", + fields: ([]*main.Field) (len=1 cap=1) { + (*main.Field)(0xc0001d9800)({ + name: (string) (len=5) "alias", + kind: (string) (len=6) "string", + isMap: (bool) false, + isArray: (bool) false, + isEnum: (bool) false, + isMessage: (bool) false, + isOptional: (bool) false + }) + } + }), + (string) (len=25) "LnurlWithdrawInfoResponse": (*main.Message)(0xc000038680)({ + fullName: (string) (len=25) "LnurlWithdrawInfoResponse", + name: (string) (len=25) "LnurlWithdrawInfoResponse", + fields: ([]*main.Field) (len=8 cap=8) { + (*main.Field)(0xc000208480)({ + 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)(0xc0002084b0)({ + 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)(0xc0002084e0)({ + 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 + }), + (*main.Field)(0xc000208510)({ + name: (string) (len=18) "defaultDescription", + kind: (string) (len=6) "string", + isMap: (bool) false, + isArray: (bool) false, + isEnum: (bool) false, + isMessage: (bool) false, + isOptional: (bool) false + }), + (*main.Field)(0xc000208540)({ + 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 + }), + (*main.Field)(0xc000208570)({ + 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 + }), + (*main.Field)(0xc0002085a0)({ + name: (string) (len=12) "balanceCheck", + kind: (string) (len=6) "string", + isMap: (bool) false, + isArray: (bool) false, + isEnum: (bool) false, + isMessage: (bool) false, + isOptional: (bool) false + }), + (*main.Field)(0xc0002085d0)({ + name: (string) (len=7) "payLink", + 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)(0xc000038c00)({ + fullName: (string) (len=15) "MigrationUpdate", + name: (string) (len=15) "MigrationUpdate", + fields: ([]*main.Field) (len=2 cap=2) { + (*main.Field)(0xc000208e40)({ + 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)(0xc000208e70)({ + 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=11) "UsageMetric": (*main.Message)(0xc000243240)({ + fullName: (string) (len=11) "UsageMetric", + name: (string) (len=11) "UsageMetric", + fields: ([]*main.Field) (len=9 cap=16) { + (*main.Field)(0xc0001d8ab0)({ + name: (string) (len=15) "processed_at_ms", + kind: (string) (len=5) "int64", + isMap: (bool) false, + isArray: (bool) false, + isEnum: (bool) false, + isMessage: (bool) false, + isOptional: (bool) false + }), + (*main.Field)(0xc0001d8ae0)({ + name: (string) (len=14) "parsed_in_nano", + kind: (string) (len=5) "int64", + isMap: (bool) false, + isArray: (bool) false, + isEnum: (bool) false, + isMessage: (bool) false, + isOptional: (bool) false + }), + (*main.Field)(0xc0001d8b10)({ + name: (string) (len=12) "auth_in_nano", + kind: (string) (len=5) "int64", + isMap: (bool) false, + isArray: (bool) false, + isEnum: (bool) false, + isMessage: (bool) false, + isOptional: (bool) false + }), + (*main.Field)(0xc0001d8b40)({ + 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 + }), + (*main.Field)(0xc0001d8b70)({ + 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)(0xc0001d8ba0)({ + 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 + }), + (*main.Field)(0xc0001d8bd0)({ + 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)(0xc0001d8c00)({ + name: (string) (len=5) "nostr", + kind: (string) (len=4) "bool", + isMap: (bool) false, + isArray: (bool) false, + isEnum: (bool) false, + isMessage: (bool) false, + isOptional: (bool) false + }), + (*main.Field)(0xc0001d8c30)({ + name: (string) (len=10) "batch_size", + kind: (string) (len=5) "int64", + isMap: (bool) false, + isArray: (bool) false, + isEnum: (bool) false, + isMessage: (bool) false, + isOptional: (bool) false + }) + } + }), + (string) (len=12) "RoutingEvent": (*main.Message)(0xc0002436c0)({ + fullName: (string) (len=12) "RoutingEvent", + name: (string) (len=12) "RoutingEvent", + fields: ([]*main.Field) (len=12 cap=16) { + (*main.Field)(0xc0001d9020)({ + name: (string) (len=19) "incoming_channel_id", + kind: (string) (len=5) "int64", + isMap: (bool) false, + isArray: (bool) false, + isEnum: (bool) false, + isMessage: (bool) false, + isOptional: (bool) false + }), + (*main.Field)(0xc0001d9050)({ + name: (string) (len=16) "incoming_htlc_id", + kind: (string) (len=5) "int64", + isMap: (bool) false, + isArray: (bool) false, + isEnum: (bool) false, + isMessage: (bool) false, + isOptional: (bool) false + }), + (*main.Field)(0xc0001d9080)({ + name: (string) (len=19) "outgoing_channel_id", + kind: (string) (len=5) "int64", + isMap: (bool) false, + isArray: (bool) false, + isEnum: (bool) false, + isMessage: (bool) false, + isOptional: (bool) false + }), + (*main.Field)(0xc0001d90b0)({ + name: (string) (len=16) "outgoing_htlc_id", + kind: (string) (len=5) "int64", + isMap: (bool) false, + isArray: (bool) false, + isEnum: (bool) false, + isMessage: (bool) false, + isOptional: (bool) false + }), + (*main.Field)(0xc0001d90e0)({ + name: (string) (len=12) "timestamp_ns", + kind: (string) (len=5) "int64", + isMap: (bool) false, + isArray: (bool) false, + isEnum: (bool) false, + isMessage: (bool) false, + isOptional: (bool) false + }), + (*main.Field)(0xc0001d9110)({ + 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)(0xc0001d9140)({ + 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 + }), + (*main.Field)(0xc0001d9170)({ + 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)(0xc0001d91a0)({ + name: (string) (len=14) "failure_string", + kind: (string) (len=6) "string", + isMap: (bool) false, + isArray: (bool) false, + isEnum: (bool) false, + isMessage: (bool) false, + isOptional: (bool) false + }), + (*main.Field)(0xc0001d91d0)({ + 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)(0xc0001d9200)({ + 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)(0xc0001d9230)({ + 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 + }) + } + }), + (string) (len=20) "AddAppInvoiceRequest": (*main.Message)(0xc000243b40)({ + fullName: (string) (len=20) "AddAppInvoiceRequest", + name: (string) (len=20) "AddAppInvoiceRequest", + fields: ([]*main.Field) (len=3 cap=4) { + (*main.Field)(0xc0001d9b30)({ + 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)(0xc0001d9b60)({ + 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)(0xc0001d9b90)({ + 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=18) "NewInvoiceResponse": (*main.Message)(0xc000243ec0)({ + fullName: (string) (len=18) "NewInvoiceResponse", + name: (string) (len=18) "NewInvoiceResponse", + fields: ([]*main.Field) (len=1 cap=1) { + (*main.Field)(0xc000208150)({ + 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 + }) + } + }), + (string) (len=7) "Product": (*main.Message)(0xc000038b40)({ + fullName: (string) (len=7) "Product", + name: (string) (len=7) "Product", + fields: ([]*main.Field) (len=3 cap=4) { + (*main.Field)(0xc000208d50)({ + 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)(0xc000208d80)({ + 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)(0xc000208db0)({ +>>>>>>> master name: (string) (len=10) "price_sats", kind: (string) (len=5) "int64", isMap: (bool) false, @@ -3270,7 +5713,7 @@ }) } -parsing file: structs 60 +parsing file: structs 62 parsing file: methods 2 -> [{guest Guest map[]} {user User map[app_id:string app_user_id:string user_id:string]} {admin Admin map[admin_id:string]} {metrics Metrics map[operator_id:string]} {app App map[app_id:string]}] diff --git a/proto/autogenerated/ts/express_server.ts b/proto/autogenerated/ts/express_server.ts index cab06174..68a45ca0 100644 --- a/proto/autogenerated/ts/express_server.ts +++ b/proto/autogenerated/ts/express_server.ts @@ -559,6 +559,25 @@ export default (methods: Types.ServerMethods, opts: ServerOptions) => { opts.metricsCallback([{ ...info, ...stats, ...authContext }]) } catch (ex) { const e = ex as any; logErrorAndReturnResponse(e, e.message || e, res, logger, { ...info, ...stats, ...authCtx }, opts.metricsCallback); if (opts.throwErrors) throw e } }) + if (!opts.allowNotImplementedMethods && !methods.UserHealth) throw new Error('method: UserHealth is not implemented') + app.post('/api/user/health', async (req, res) => { + const info: Types.RequestInfo = { rpcName: 'UserHealth', batch: false, nostr: false, batchSize: 0} + const stats: Types.RequestStats = { startMs:req.startTimeMs || 0, start:req.startTime || 0n, parse: process.hrtime.bigint(), guard: 0n, validate: 0n, handle: 0n } + let authCtx: Types.AuthContext = {} + try { + if (!methods.UserHealth) throw new Error('method: UserHealth is not implemented') + const authContext = await opts.UserAuthGuard(req.headers['authorization']) + authCtx = authContext + stats.guard = process.hrtime.bigint() + stats.validate = stats.guard + const query = req.query + const params = req.params + await methods.UserHealth({rpcName:'UserHealth', ctx:authContext }) + stats.handle = process.hrtime.bigint() + res.json({status: 'OK'}) + opts.metricsCallback([{ ...info, ...stats, ...authContext }]) + } catch (ex) { const e = ex as any; logErrorAndReturnResponse(e, e.message || e, res, logger, { ...info, ...stats, ...authCtx }, opts.metricsCallback); if (opts.throwErrors) throw e } + }) if (!opts.allowNotImplementedMethods && !methods.GetUserInfo) throw new Error('method: GetUserInfo is not implemented') app.post('/api/user/info', async (req, res) => { const info: Types.RequestInfo = { rpcName: 'GetUserInfo', batch: false, nostr: false, batchSize: 0} @@ -851,6 +870,16 @@ export default (methods: Types.ServerMethods, opts: ServerOptions) => { const opStats: Types.RequestStats = { startMs:req.startTimeMs || 0, start:req.startTime || 0n, parse: stats.parse, guard: stats.guard, validate: 0n, handle: 0n } try { switch(operation.rpcName) { + case 'UserHealth': + if (!methods.UserHealth) { + throw new Error('method UserHealth not found' ) + } else { + opStats.validate = opStats.guard + await methods.UserHealth({...operation, ctx}); responses.push({ status: 'OK' }) + opStats.handle = process.hrtime.bigint() + callsMetrics.push({ ...opInfo, ...opStats, ...ctx }) + } + break case 'GetUserInfo': if (!methods.GetUserInfo) { throw new Error('method GetUserInfo not found' ) diff --git a/proto/autogenerated/ts/http_client.ts b/proto/autogenerated/ts/http_client.ts index cf82b7c5..7d0f95e7 100644 --- a/proto/autogenerated/ts/http_client.ts +++ b/proto/autogenerated/ts/http_client.ts @@ -351,6 +351,17 @@ export default (params: ClientParams) => ({ } return { status: 'ERROR', reason: 'invalid response' } }, + UserHealth: async (): Promise => { + const auth = await params.retrieveUserAuth() + if (auth === null) throw new Error('retrieveUserAuth() returned null') + let finalRoute = '/api/user/health' + const { data } = await axios.post(params.baseUrl + finalRoute, {}, { headers: { 'authorization': auth } }) + if (data.status === 'ERROR' && typeof data.reason === 'string') return data + if (data.status === 'OK') { + return data + } + return { status: 'ERROR', reason: 'invalid response' } + }, GetUserInfo: async (): Promise => { const auth = await params.retrieveUserAuth() if (auth === null) throw new Error('retrieveUserAuth() returned null') diff --git a/proto/autogenerated/ts/nostr_client.ts b/proto/autogenerated/ts/nostr_client.ts index 3453e884..e8f127f2 100644 --- a/proto/autogenerated/ts/nostr_client.ts +++ b/proto/autogenerated/ts/nostr_client.ts @@ -9,6 +9,17 @@ export type NostrClientParams = { checkResult?: true } export default (params: NostrClientParams, send: (to:string, message: NostrRequest) => Promise, subscribe: (to:string, message: NostrRequest, cb:(res:any)=> void) => void) => ({ + UserHealth: async (): Promise => { + const auth = await params.retrieveNostrUserAuth() + if (auth === null) throw new Error('retrieveNostrUserAuth() returned null') + const nostrRequest: NostrRequest = {} + const data = await send(params.pubDestination, {rpcName:'UserHealth',authIdentifier:auth, ...nostrRequest }) + if (data.status === 'ERROR' && typeof data.reason === 'string') return data + if (data.status === 'OK') { + return data + } + return { status: 'ERROR', reason: 'invalid response' } + }, GetUserInfo: async (): Promise => { const auth = await params.retrieveNostrUserAuth() if (auth === null) throw new Error('retrieveNostrUserAuth() returned null') diff --git a/proto/autogenerated/ts/nostr_transport.ts b/proto/autogenerated/ts/nostr_transport.ts index 1e5fba24..00a0e3d6 100644 --- a/proto/autogenerated/ts/nostr_transport.ts +++ b/proto/autogenerated/ts/nostr_transport.ts @@ -29,6 +29,19 @@ export default (methods: Types.ServerMethods, opts: NostrOptions) => { const stats: Types.RequestStats = { startMs, start: startTime, parse: process.hrtime.bigint(), guard: 0n, validate: 0n, handle: 0n } let authCtx: Types.AuthContext = {} switch (req.rpcName) { + case 'UserHealth': + try { + if (!methods.UserHealth) throw new Error('method: UserHealth is not implemented') + const authContext = await opts.NostrUserAuthGuard(req.appId, req.authIdentifier) + stats.guard = process.hrtime.bigint() + authCtx = authContext + stats.validate = stats.guard + await methods.UserHealth({rpcName:'UserHealth', ctx:authContext }) + stats.handle = process.hrtime.bigint() + res({status: 'OK'}) + opts.metricsCallback([{ ...info, ...stats, ...authContext }]) + }catch(ex){ const e = ex as any; logErrorAndReturnResponse(e, e.message || e, res, logger, { ...info, ...stats, ...authCtx }, opts.metricsCallback); if (opts.throwErrors) throw e } + break case 'GetUserInfo': try { if (!methods.GetUserInfo) throw new Error('method: GetUserInfo is not implemented') @@ -267,6 +280,16 @@ export default (methods: Types.ServerMethods, opts: NostrOptions) => { const opStats: Types.RequestStats = { startMs, start: startTime, parse: stats.parse, guard: stats.guard, validate: 0n, handle: 0n } try { switch(operation.rpcName) { + case 'UserHealth': + if (!methods.UserHealth) { + throw new Error('method not defined: UserHealth') + } else { + opStats.validate = opStats.guard + await methods.UserHealth({...operation, ctx}); responses.push({ status: 'OK' }) + opStats.handle = process.hrtime.bigint() + callsMetrics.push({ ...opInfo, ...opStats, ...ctx }) + } + break case 'GetUserInfo': if (!methods.GetUserInfo) { throw new Error('method not defined: GetUserInfo') diff --git a/proto/autogenerated/ts/types.ts b/proto/autogenerated/ts/types.ts index bcde79cd..19fec9e1 100644 --- a/proto/autogenerated/ts/types.ts +++ b/proto/autogenerated/ts/types.ts @@ -13,8 +13,8 @@ export type UserContext = { app_id: string app_user_id: string } -export type UserMethodInputs = GetUserInfo_Input | AddProduct_Input | NewProductInvoice_Input | GetUserOperations_Input | NewAddress_Input | PayAddress_Input | NewInvoice_Input | DecodeInvoice_Input | PayInvoice_Input | OpenChannel_Input | GetLnurlWithdrawLink_Input | GetLnurlPayLink_Input | GetLNURLChannelLink_Input -export type UserMethodOutputs = GetUserInfo_Output | AddProduct_Output | NewProductInvoice_Output | GetUserOperations_Output | NewAddress_Output | PayAddress_Output | NewInvoice_Output | DecodeInvoice_Output | PayInvoice_Output | OpenChannel_Output | GetLnurlWithdrawLink_Output | GetLnurlPayLink_Output | GetLNURLChannelLink_Output +export type UserMethodInputs = UserHealth_Input | GetUserInfo_Input | AddProduct_Input | NewProductInvoice_Input | GetUserOperations_Input | NewAddress_Input | PayAddress_Input | NewInvoice_Input | DecodeInvoice_Input | PayInvoice_Input | OpenChannel_Input | GetLnurlWithdrawLink_Input | GetLnurlPayLink_Input | GetLNURLChannelLink_Input +export type UserMethodOutputs = UserHealth_Output | GetUserInfo_Output | AddProduct_Output | NewProductInvoice_Output | GetUserOperations_Output | NewAddress_Output | PayAddress_Output | NewInvoice_Output | DecodeInvoice_Output | PayInvoice_Output | OpenChannel_Output | GetLnurlWithdrawLink_Output | GetLnurlPayLink_Output | GetLNURLChannelLink_Output export type AdminContext = { admin_id: string } @@ -126,6 +126,9 @@ export type SetMockAppUserBalance_Output = ResultError | { status: 'OK' } export type SetMockAppBalance_Input = {rpcName:'SetMockAppBalance', req: SetMockAppBalanceRequest} export type SetMockAppBalance_Output = ResultError | { status: 'OK' } +export type UserHealth_Input = {rpcName:'UserHealth'} +export type UserHealth_Output = ResultError | { status: 'OK' } + export type GetUserInfo_Input = {rpcName:'GetUserInfo'} export type GetUserInfo_Output = ResultError | ({ status: 'OK' } & UserInfo) @@ -203,6 +206,7 @@ export type ServerMethods = { GetAppUserLNURLInfo?: (req: GetAppUserLNURLInfo_Input & {ctx: AppContext }) => Promise SetMockAppUserBalance?: (req: SetMockAppUserBalance_Input & {ctx: AppContext }) => Promise SetMockAppBalance?: (req: SetMockAppBalance_Input & {ctx: AppContext }) => Promise + UserHealth?: (req: UserHealth_Input & {ctx: UserContext }) => Promise GetUserInfo?: (req: GetUserInfo_Input & {ctx: UserContext }) => Promise AddProduct?: (req: AddProduct_Input & {ctx: UserContext }) => Promise NewProductInvoice?: (req: NewProductInvoice_Input & {ctx: UserContext }) => Promise @@ -264,6 +268,1182 @@ export const NewAddressRequestValidate = (o?: NewAddressRequest, opts: NewAddres return null } +<<<<<<< HEAD +======= +export type NewInvoiceRequest = { + amountSats: number + memo: string +} +export const NewInvoiceRequestOptionalFields: [] = [] +export type NewInvoiceRequestOptions = 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`) + + return null +} + +export type GetUserOperationsRequest = { + latestIncomingInvoice: number + latestOutgoingInvoice: number + latestIncomingTx: number + latestOutgoingTx: number + latestIncomingUserToUserPayment: number + latestOutgoingUserToUserPayment: 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 +} +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`) + + 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 +} +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 +} +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 (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.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.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`) + + return null +} + +export type GetAppUserLNURLInfoRequest = { + user_identifier: string + base_url_override: string +} +export const GetAppUserLNURLInfoRequestOptionalFields: [] = [] +export type GetAppUserLNURLInfoRequestOptions = OptionsBaseMessage & { + checkOptionalsAreSet?: [] + user_identifier_CustomCheck?: (v: string) => boolean + base_url_override_CustomCheck?: (v: string) => boolean +} +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.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`) + + 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 OpenChannelResponse = { + channelId: string +} +export const OpenChannelResponseOptionalFields: [] = [] +export type OpenChannelResponseOptions = OptionsBaseMessage & { + checkOptionalsAreSet?: [] + channelId_CustomCheck?: (v: string) => boolean +} +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.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 UsersInfo = { + total: number + no_balance: number + negative_balance: number + always_been_inactive: number + balance_avg: number + balance_median: number +} +export const UsersInfoOptionalFields: [] = [] +export type UsersInfoOptions = 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 +} +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.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 +} + +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 AuthAppRequest = { + name: string + allow_user_creation?: boolean +} +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 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.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 ((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 +} + +export type AppUser = { + identifier: string + info: UserInfo + max_withdrawable: number +} +export const AppUserOptionalFields: [] = [] +export type AppUserOptions = OptionsBaseMessage & { + checkOptionalsAreSet?: [] + identifier_CustomCheck?: (v: string) => boolean + info_Options?: UserInfoOptions + max_withdrawable_CustomCheck?: (v: number) => boolean +} +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.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 +} + +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 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 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.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 PayInvoiceRequest = { + invoice: string + amount: number +} +export const PayInvoiceRequestOptionalFields: [] = [] +export type PayInvoiceRequestOptions = 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 => { + 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 (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 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 OpenChannel = { + channel_id: string + capacity: number + active: boolean + lifetime: number + local_balance: number + remote_balance: number +} +export const OpenChannelOptionalFields: [] = [] +export type OpenChannelOptions = OptionsBaseMessage & { + checkOptionalsAreSet?: [] + channel_id_CustomCheck?: (v: string) => boolean + capacity_CustomCheck?: (v: number) => boolean + active_CustomCheck?: (v: boolean) => boolean + lifetime_CustomCheck?: (v: number) => boolean + local_balance_CustomCheck?: (v: number) => boolean + remote_balance_CustomCheck?: (v: number) => boolean +} +export const OpenChannelValidate = (o?: OpenChannel, opts: OpenChannelOptions = {}, path: string = 'OpenChannel::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.active !== 'boolean') return new Error(`${path}.active: is not a boolean`) + if (opts.active_CustomCheck && !opts.active_CustomCheck(o.active)) return new Error(`${path}.active: custom check failed`) + + if (typeof o.lifetime !== 'number') return new Error(`${path}.lifetime: is not a number`) + if (opts.lifetime_CustomCheck && !opts.lifetime_CustomCheck(o.lifetime)) return new Error(`${path}.lifetime: custom check failed`) + + if (typeof o.local_balance !== 'number') return new Error(`${path}.local_balance: is not a number`) + if (opts.local_balance_CustomCheck && !opts.local_balance_CustomCheck(o.local_balance)) return new Error(`${path}.local_balance: custom check failed`) + + if (typeof o.remote_balance !== 'number') return new Error(`${path}.remote_balance: is not a number`) + if (opts.remote_balance_CustomCheck && !opts.remote_balance_CustomCheck(o.remote_balance)) return new Error(`${path}.remote_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 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`) + + return null +} + +export type EncryptionExchangeRequest = { + publicKey: string + deviceId: string +} +export const EncryptionExchangeRequestOptionalFields: [] = [] +export type EncryptionExchangeRequestOptions = OptionsBaseMessage & { + checkOptionalsAreSet?: [] + publicKey_CustomCheck?: (v: string) => boolean + deviceId_CustomCheck?: (v: string) => boolean +} +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.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`) + + return null +} + +export type AppMetrics = { + app: Application + users: UsersInfo + total_received: number + total_spent: number + total_available: number + unpaid_invoices: number + operations: UserOperation[] +} +export const AppMetricsOptionalFields: [] = [] +export type AppMetricsOptions = OptionsBaseMessage & { + checkOptionalsAreSet?: [] + app_Options?: ApplicationOptions + users_Options?: UsersInfoOptions + total_received_CustomCheck?: (v: number) => boolean + total_spent_CustomCheck?: (v: number) => boolean + total_available_CustomCheck?: (v: number) => boolean + unpaid_invoices_CustomCheck?: (v: number) => boolean + operations_ItemOptions?: UserOperationOptions + operations_CustomCheck?: (v: UserOperation[]) => boolean +} +export const AppMetricsValidate = (o?: AppMetrics, opts: AppMetricsOptions = {}, path: string = 'AppMetrics::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 + + + const usersErr = UsersInfoValidate(o.users, opts.users_Options, `${path}.users`) + if (usersErr !== null) return usersErr + + + if (typeof o.total_received !== 'number') return new Error(`${path}.total_received: is not a number`) + if (opts.total_received_CustomCheck && !opts.total_received_CustomCheck(o.total_received)) return new Error(`${path}.total_received: custom check failed`) + + if (typeof o.total_spent !== 'number') return new Error(`${path}.total_spent: is not a number`) + if (opts.total_spent_CustomCheck && !opts.total_spent_CustomCheck(o.total_spent)) return new Error(`${path}.total_spent: custom check failed`) + + if (typeof o.total_available !== 'number') return new Error(`${path}.total_available: is not a number`) + if (opts.total_available_CustomCheck && !opts.total_available_CustomCheck(o.total_available)) return new Error(`${path}.total_available: custom check failed`) + + if (typeof o.unpaid_invoices !== 'number') return new Error(`${path}.unpaid_invoices: is not a number`) + if (opts.unpaid_invoices_CustomCheck && !opts.unpaid_invoices_CustomCheck(o.unpaid_invoices)) return new Error(`${path}.unpaid_invoices: 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 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 LndMetricsRequest = { + from_unix?: number + to_unix?: number +} +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 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 ((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`) + + return null +} + +export type AuthApp = { + app: Application + auth_token: string +} +export const AuthAppOptionalFields: [] = [] +export type AuthAppOptions = OptionsBaseMessage & { + checkOptionalsAreSet?: [] + app_Options?: ApplicationOptions + auth_token_CustomCheck?: (v: string) => boolean +} +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') + + const appErr = ApplicationValidate(o.app, opts.app_Options, `${path}.app`) + if (appErr !== null) return appErr + + + 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 SendAppUserToAppPaymentRequest = { + from_user_identifier: string + amount: number +} +export const SendAppUserToAppPaymentRequestOptionalFields: [] = [] +export type SendAppUserToAppPaymentRequestOptions = OptionsBaseMessage & { + checkOptionalsAreSet?: [] + from_user_identifier_CustomCheck?: (v: string) => boolean + amount_CustomCheck?: (v: number) => boolean +} +export const SendAppUserToAppPaymentRequestValidate = (o?: SendAppUserToAppPaymentRequest, opts: SendAppUserToAppPaymentRequestOptions = {}, path: string = 'SendAppUserToAppPaymentRequest::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.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 NewAddressResponse = { + address: string +} +export const NewAddressResponseOptionalFields: [] = [] +export type NewAddressResponseOptions = OptionsBaseMessage & { + checkOptionalsAreSet?: [] + address_CustomCheck?: (v: string) => boolean +} +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.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 GetProductBuyLinkResponse = { + link: string +} +export const GetProductBuyLinkResponseOptionalFields: [] = [] +export type GetProductBuyLinkResponseOptions = OptionsBaseMessage & { + checkOptionalsAreSet?: [] + link_CustomCheck?: (v: string) => boolean +} +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.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 DecodeInvoiceResponse = { + amount: number +} +export const DecodeInvoiceResponseOptionalFields: [] = [] +export type DecodeInvoiceResponseOptions = OptionsBaseMessage & { + checkOptionalsAreSet?: [] + amount_CustomCheck?: (v: number) => boolean +} +export const DecodeInvoiceResponseValidate = (o?: DecodeInvoiceResponse, opts: DecodeInvoiceResponseOptions = {}, path: string = 'DecodeInvoiceResponse::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`) + + 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 UserInfo = { + userId: string + balance: number + max_withdrawable: number + user_identifier: string +} +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 +} +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`) + + return null +} + +export type AddProductRequest = { + name: string + price_sats: number +} +export const AddProductRequestOptionalFields: [] = [] +export type AddProductRequestOptions = OptionsBaseMessage & { + checkOptionalsAreSet?: [] + name_CustomCheck?: (v: string) => boolean + price_sats_CustomCheck?: (v: number) => boolean +} +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.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 AddAppUserInvoiceRequest = { + receiver_identifier: string + payer_identifier: string + http_callback_url: string + invoice_req: NewInvoiceRequest +} +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 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.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.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 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 (!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 AppsMetricsRequest = { + from_unix?: number + to_unix?: number + include_operations?: boolean +} +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 ClosedChannel = { + channel_id: string + capacity: number + closed_height: number +} +export const ClosedChannelOptionalFields: [] = [] +export type ClosedChannelOptions = OptionsBaseMessage & { + checkOptionalsAreSet?: [] + channel_id_CustomCheck?: (v: string) => boolean + capacity_CustomCheck?: (v: number) => boolean + closed_height_CustomCheck?: (v: number) => boolean +} +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 (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.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`) + + return null +} + +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.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.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 +} + +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 Empty = { +} +export const EmptyOptionalFields: [] = [] +export type EmptyOptions = OptionsBaseMessage & { + checkOptionalsAreSet?: [] +} +export const EmptyValidate = (o?: Empty, opts: EmptyOptions = {}, path: string = 'Empty::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') + + 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 LnurlWithdrawInfoResponse = { + tag: string + callback: string + k1: string + defaultDescription: string + minWithdrawable: number + maxWithdrawable: number + balanceCheck: string + payLink: string +} +export const LnurlWithdrawInfoResponseOptionalFields: [] = [] +export type LnurlWithdrawInfoResponseOptions = 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 +} +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.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.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 MigrationUpdate = { + closure?: ClosureMigration + relays?: RelaysMigration +} +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 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.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.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 +} + +>>>>>>> master export type UsageMetric = { processed_at_ms: number parsed_in_nano: number @@ -395,24 +1575,36 @@ export const RoutingEventValidate = (o?: RoutingEvent, opts: RoutingEventOptions return null } -export type LndGetInfoRequest = { - nodeId: number +export type AddAppInvoiceRequest = { + payer_identifier: string + http_callback_url: string + invoice_req: NewInvoiceRequest } -export const LndGetInfoRequestOptionalFields: [] = [] -export type LndGetInfoRequestOptions = OptionsBaseMessage & { +export const AddAppInvoiceRequestOptionalFields: [] = [] +export type AddAppInvoiceRequestOptions = OptionsBaseMessage & { checkOptionalsAreSet?: [] - nodeId_CustomCheck?: (v: number) => boolean + payer_identifier_CustomCheck?: (v: string) => boolean + http_callback_url_CustomCheck?: (v: string) => boolean + invoice_req_Options?: NewInvoiceRequestOptions } -export const LndGetInfoRequestValidate = (o?: LndGetInfoRequest, opts: LndGetInfoRequestOptions = {}, path: string = 'LndGetInfoRequest::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.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`) + 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 } +<<<<<<< HEAD export type GetUserOperationsRequest = { latestIncomingInvoice: number latestOutgoingInvoice: number @@ -942,42 +2134,22 @@ export type LnurlPayInfoResponse = { metadata: string allowsNostr: boolean nostrPubkey: string +======= +export type NewInvoiceResponse = { + invoice: string +>>>>>>> master } -export const LnurlPayInfoResponseOptionalFields: [] = [] -export type LnurlPayInfoResponseOptions = OptionsBaseMessage & { +export const NewInvoiceResponseOptionalFields: [] = [] +export type NewInvoiceResponseOptions = 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 + invoice_CustomCheck?: (v: string) => boolean } -export const LnurlPayInfoResponseValidate = (o?: LnurlPayInfoResponse, opts: LnurlPayInfoResponseOptions = {}, path: string = 'LnurlPayInfoResponse::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.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`) + 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 } @@ -1094,6 +2266,7 @@ export const AddProductRequestValidate = (o?: AddProductRequest, opts: AddProduc return null } +<<<<<<< HEAD export type SetMockInvoiceAsPaidRequest = { invoice: string amount: number @@ -1317,26 +2490,22 @@ export type UserInfo = { userId: string balance: number max_withdrawable: number +======= +export type ClosureMigration = { + closes_at_unix: number +>>>>>>> master } -export const UserInfoOptionalFields: [] = [] -export type UserInfoOptions = OptionsBaseMessage & { +export const ClosureMigrationOptionalFields: [] = [] +export type ClosureMigrationOptions = OptionsBaseMessage & { checkOptionalsAreSet?: [] - userId_CustomCheck?: (v: string) => boolean - balance_CustomCheck?: (v: number) => boolean - max_withdrawable_CustomCheck?: (v: number) => boolean + closes_at_unix_CustomCheck?: (v: number) => boolean } -export const UserInfoValidate = (o?: UserInfo, opts: UserInfoOptions = {}, path: string = 'UserInfo::root.'): Error | null => { +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.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.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 } @@ -1362,6 +2531,7 @@ export const RelaysMigrationValidate = (o?: RelaysMigration, opts: RelaysMigrati return null } +<<<<<<< HEAD export type GetAppUserRequest = { user_identifier: string } @@ -1376,10 +2546,197 @@ export const GetAppUserRequestValidate = (o?: GetAppUserRequest, opts: GetAppUse 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`) +======= +export type LndNodeMetrics = { + channels_balance_events: ChannelBalanceEvent[] + chain_balance_events: ChainBalanceEvent[] + routing_events: RoutingEvent[] + offline_channels: number + online_channels: number + pending_channels: number + closing_channels: number + open_channels: OpenChannel[] + closed_channels: ClosedChannel[] +} +export const LndNodeMetricsOptionalFields: [] = [] +export type LndNodeMetricsOptions = 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 + routing_events_ItemOptions?: RoutingEventOptions + routing_events_CustomCheck?: (v: RoutingEvent[]) => 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 +} +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 (!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 (!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 (!Array.isArray(o.routing_events)) return new Error(`${path}.routing_events: is not an array`) + for (let index = 0; index < o.routing_events.length; index++) { + const routing_eventsErr = RoutingEventValidate(o.routing_events[index], opts.routing_events_ItemOptions, `${path}.routing_events[${index}]`) + if (routing_eventsErr !== null) return routing_eventsErr + } + if (opts.routing_events_CustomCheck && !opts.routing_events_CustomCheck(o.routing_events)) return new Error(`${path}.routing_events: 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.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.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.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 (!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 (!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 } +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 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.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 (!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 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 + +>>>>>>> master + + return null +} + +<<<<<<< HEAD export type PayAppUserInvoiceRequest = { user_identifier: string invoice: string @@ -1404,10 +2761,51 @@ export const PayAppUserInvoiceRequestValidate = (o?: PayAppUserInvoiceRequest, o 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`) +======= +export type LiveUserOperation = { + operation: UserOperation +} +export const LiveUserOperationOptionalFields: [] = [] +export type LiveUserOperationOptions = OptionsBaseMessage & { + checkOptionalsAreSet?: [] + operation_Options?: UserOperationOptions +} +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') + + const operationErr = UserOperationValidate(o.operation, opts.operation_Options, `${path}.operation`) + if (operationErr !== null) return operationErr + 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`) +>>>>>>> master + + return null +} + +<<<<<<< HEAD export type GetProductBuyLinkResponse = { link: string } @@ -1526,35 +2924,37 @@ export type EmptyOptions = OptionsBaseMessage & { export const EmptyValidate = (o?: Empty, opts: EmptyOptions = {}, path: string = 'Empty::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') - - return null +======= +export type PayAddressResponse = { + txId: string + operation_id: string + service_fee: number + network_fee: number } - -export type AppsMetricsRequest = { - from_unix?: number - to_unix?: number - include_operations?: boolean +export const PayAddressResponseOptionalFields: [] = [] +export type PayAddressResponseOptions = OptionsBaseMessage & { + checkOptionalsAreSet?: [] + txId_CustomCheck?: (v: string) => boolean + operation_id_CustomCheck?: (v: string) => boolean + service_fee_CustomCheck?: (v: number) => boolean + network_fee_CustomCheck?: (v: number) => boolean } -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 => { +export const PayAddressResponseValidate = (o?: PayAddressResponse, opts: PayAddressResponseOptions = {}, path: string = 'PayAddressResponse::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.txId !== 'string') return new Error(`${path}.txId: is not a string`) + if (opts.txId_CustomCheck && !opts.txId_CustomCheck(o.txId)) return new Error(`${path}.txId: 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.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`) +>>>>>>> master - 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.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 } @@ -1750,6 +3150,7 @@ export const UserOperationValidate = (o?: UserOperation, opts: UserOperationOpti 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`) +<<<<<<< HEAD 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`) @@ -1767,10 +3168,37 @@ export const UserOperationValidate = (o?: UserOperation, opts: UserOperationOpti 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`) +======= +export type PayAppUserInvoiceRequest = { + user_identifier: string + invoice: string + amount: number +} +export const PayAppUserInvoiceRequestOptionalFields: [] = [] +export type PayAppUserInvoiceRequestOptions = 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 => { + 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`) + + 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`) +>>>>>>> master return null } +<<<<<<< HEAD export type OpenChannelRequest = { destination: string fundingAmount: number @@ -1849,10 +3277,37 @@ export const GetUserOperationsResponseValidate = (o?: GetUserOperationsResponse, const latestIncomingUserToUserPayemntsErr = UserOperationsValidate(o.latestIncomingUserToUserPayemnts, opts.latestIncomingUserToUserPayemnts_Options, `${path}.latestIncomingUserToUserPayemnts`) if (latestIncomingUserToUserPayemntsErr !== null) return latestIncomingUserToUserPayemntsErr +======= +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`) +>>>>>>> master return null } +<<<<<<< HEAD export type LndMetricsRequest = { from_unix?: number to_unix?: number @@ -1873,10 +3328,32 @@ export const LndMetricsRequestValidate = (o?: LndMetricsRequest, opts: LndMetric 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 +======= +export type UserOperations = { + fromIndex: number + toIndex: number + operations: UserOperation[] } +export const UserOperationsOptionalFields: [] = [] +export type UserOperationsOptions = OptionsBaseMessage & { + checkOptionalsAreSet?: [] + fromIndex_CustomCheck?: (v: number) => boolean + toIndex_CustomCheck?: (v: number) => boolean + operations_ItemOptions?: UserOperationOptions + operations_CustomCheck?: (v: UserOperation[]) => boolean +} +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.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`) +>>>>>>> master + + 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`) + +<<<<<<< HEAD export type AddAppRequest = { name: string allow_user_creation: boolean @@ -1998,6 +3475,65 @@ export const HandleLnurlPayResponseValidate = (o?: HandleLnurlPayResponse, opts: if (routesErr !== null) return routesErr } if (opts.routes_CustomCheck && !opts.routes_CustomCheck(o.routes)) return new Error(`${path}.routes: 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 ChannelBalanceEvent = { + block_height: number + channel_id: string + local_balance_sats: number + remote_balance_sats: 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 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.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 (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 DecodeInvoiceRequest = { + invoice: string +} +export const DecodeInvoiceRequestOptionalFields: [] = [] +export type DecodeInvoiceRequestOptions = OptionsBaseMessage & { + checkOptionalsAreSet?: [] + invoice_CustomCheck?: (v: string) => boolean +} +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.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`) +>>>>>>> master return null } diff --git a/proto/service/methods.proto b/proto/service/methods.proto index b2686fa6..32eb196d 100644 --- a/proto/service/methods.proto +++ b/proto/service/methods.proto @@ -240,6 +240,12 @@ service LightningPub { // // + rpc UserHealth(structs.Empty)returns(structs.Empty){ + option (auth_type) = "User"; + option (http_method) = "post"; + option (http_route) = "/api/user/health"; + option (nostr) = true; + } rpc GetUserInfo(structs.Empty)returns(structs.UserInfo){ option (auth_type) = "User"; option (http_method) = "post"; diff --git a/proto/service/structs.proto b/proto/service/structs.proto index 5cdef468..eaa18a12 100644 --- a/proto/service/structs.proto +++ b/proto/service/structs.proto @@ -96,14 +96,35 @@ message ChainBalanceEvent { int64 total_balance = 4; } +message OpenChannel { + string channel_id = 1; + int64 capacity = 2; + bool active = 3; + int64 lifetime =4 ; + int64 local_balance=5; + int64 remote_balance = 6; +} +message ClosedChannel { + string channel_id = 1; + int64 capacity = 2; + int64 closed_height =4; +} + message LndNodeMetrics { repeated ChannelBalanceEvent channels_balance_events = 1; repeated ChainBalanceEvent chain_balance_events = 2; repeated RoutingEvent routing_events = 3; + int64 offline_channels = 4; + int64 online_channels = 5; + int64 pending_channels = 6; + int64 closing_channels = 7; + repeated OpenChannel open_channels = 8; + repeated ClosedChannel closed_channels = 9; } message LndMetrics { repeated LndNodeMetrics nodes = 1; + } message LndGetInfoRequest { @@ -297,6 +318,7 @@ message UserInfo{ string userId = 1; int64 balance = 2; int64 max_withdrawable = 3; + string user_identifier = 4; } message GetUserOperationsRequest{ diff --git a/src/services/lnd/index.ts b/src/services/lnd/index.ts index ec6dbece..46ad2b62 100644 --- a/src/services/lnd/index.ts +++ b/src/services/lnd/index.ts @@ -1,5 +1,5 @@ import * as Types from '../../../proto/autogenerated/ts/types.js' -import { GetInfoResponse, NewAddressResponse, AddInvoiceResponse, PayReq, Payment, SendCoinsResponse, EstimateFeeResponse, TransactionDetails } from '../../../proto/lnd/lightning.js' +import { GetInfoResponse, NewAddressResponse, AddInvoiceResponse, PayReq, Payment, SendCoinsResponse, EstimateFeeResponse, TransactionDetails, ClosedChannelsResponse, ListChannelsResponse, PendingChannelsResponse } from '../../../proto/lnd/lightning.js' import { EnvMustBeNonEmptyString, EnvMustBeInteger, EnvCanBeBoolean } from '../helpers/envParser.js' import { AddressPaidCb, BalanceInfo, DecodedInvoice, HtlcCb, Invoice, InvoicePaidCb, LndSettings, NewBlockCb, NodeInfo, PaidInvoice } from './settings.js' import LND from './lnd.js' @@ -32,6 +32,9 @@ export interface LightningHandler { ChannelBalance(): Promise<{ local: number, remote: number }> GetTransactions(startHeight: number): Promise GetBalance(): Promise + ListClosedChannels(): Promise + ListChannels(): Promise + ListPendingChannels(): Promise } export default (settings: LndSettings, addressPaidCb: AddressPaidCb, invoicePaidCb: InvoicePaidCb, newBlockCb: NewBlockCb, htlcCb: HtlcCb): LightningHandler => { diff --git a/src/services/lnd/lnd.ts b/src/services/lnd/lnd.ts index 0e122f40..b9f463e1 100644 --- a/src/services/lnd/lnd.ts +++ b/src/services/lnd/lnd.ts @@ -8,7 +8,7 @@ import { LightningClient } from '../../../proto/lnd/lightning.client.js' import { InvoicesClient } from '../../../proto/lnd/invoices.client.js' import { RouterClient } from '../../../proto/lnd/router.client.js' import { ChainNotifierClient } from '../../../proto/lnd/chainnotifier.client.js' -import { GetInfoResponse, AddressType, NewAddressResponse, AddInvoiceResponse, Invoice_InvoiceState, PayReq, Payment_PaymentStatus, Payment, PaymentFailureReason, SendCoinsResponse, EstimateFeeResponse, ChannelBalanceResponse, TransactionDetails } from '../../../proto/lnd/lightning.js' +import { GetInfoResponse, AddressType, NewAddressResponse, AddInvoiceResponse, Invoice_InvoiceState, PayReq, Payment_PaymentStatus, Payment, PaymentFailureReason, SendCoinsResponse, EstimateFeeResponse, ChannelBalanceResponse, TransactionDetails, ListChannelsResponse, ClosedChannelsResponse, PendingChannelsResponse } from '../../../proto/lnd/lightning.js' import { OpenChannelReq } from './openChannelReq.js'; import { AddInvoiceReq } from './addInvoiceReq.js'; import { PayInvoiceReq } from './payInvoiceReq.js'; @@ -78,6 +78,27 @@ export default class { const res = await this.lightning.getInfo({}, DeadLineMetadata()) return res.response } + async ListPendingChannels(): Promise { + const res = await this.lightning.pendingChannels({}, DeadLineMetadata()) + return res.response + } + async ListChannels(): Promise { + const res = await this.lightning.listChannels({ + activeOnly: false, inactiveOnly: false, privateOnly: false, publicOnly: false, peer: Buffer.alloc(0) + }, DeadLineMetadata()) + return res.response + } + async ListClosedChannels(): Promise { + const res = await this.lightning.closedChannels({ + abandoned: true, + breach: true, + cooperative: true, + fundingCanceled: true, + localForce: true, + remoteForce: true + }, DeadLineMetadata()) + return res.response + } async Health(): Promise { if (!this.ready) { diff --git a/src/services/lnd/mock.ts b/src/services/lnd/mock.ts index 85435c4c..5359c07b 100644 --- a/src/services/lnd/mock.ts +++ b/src/services/lnd/mock.ts @@ -7,7 +7,7 @@ import * as Types from '../../../proto/autogenerated/ts/types.js' import { LightningClient } from '../../../proto/lnd/lightning.client.js' import { InvoicesClient } from '../../../proto/lnd/invoices.client.js' import { RouterClient } from '../../../proto/lnd/router.client.js' -import { GetInfoResponse, AddressType, NewAddressResponse, AddInvoiceResponse, Invoice_InvoiceState, PayReq, Payment_PaymentStatus, Payment, PaymentFailureReason, SendCoinsResponse, EstimateFeeResponse, TransactionDetails } from '../../../proto/lnd/lightning.js' +import { GetInfoResponse, AddressType, NewAddressResponse, AddInvoiceResponse, Invoice_InvoiceState, PayReq, Payment_PaymentStatus, Payment, PaymentFailureReason, SendCoinsResponse, EstimateFeeResponse, TransactionDetails, ClosedChannelsResponse, ListChannelsResponse, PendingChannelsResponse } from '../../../proto/lnd/lightning.js' import { OpenChannelReq } from './openChannelReq.js'; import { AddInvoiceReq } from './addInvoiceReq.js'; import { PayInvoiceReq } from './payInvoiceReq.js'; @@ -39,6 +39,10 @@ export default class { Stop() { } async Warmup() { } + async ListClosedChannels(): Promise { throw new Error("ListClosedChannels disabled in mock mode") } + async ListChannels(): Promise { throw new Error("ListChannels disabled in mock mode") } + async ListPendingChannels(): Promise { throw new Error("ListPendingChannels disabled in mock mode") } + async GetInfo(): Promise { return { alias: "mock", syncedToChain: true, syncedToGraph: true, blockHeight: 1, blockHash: "" } } diff --git a/src/services/main/appUserManager.ts b/src/services/main/appUserManager.ts index d0106448..ec002e61 100644 --- a/src/services/main/appUserManager.ts +++ b/src/services/main/appUserManager.ts @@ -33,10 +33,16 @@ export default class { async GetUserInfo(ctx: Types.UserContext): Promise { const user = await this.storage.userStorage.GetUser(ctx.user_id) + const app = await this.storage.applicationStorage.GetApplication(ctx.app_id); + const appUser = await this.storage.applicationStorage.GetAppUserFromUser(app, user.user_id) + if (!appUser) { + throw new Error(`app user ${ctx.user_id} not found`) // TODO: fix logs doxing + } return { userId: ctx.user_id, balance: user.balance_sats, - max_withdrawable: this.applicationManager.paymentManager.GetMaxPayableInvoice(user.balance_sats, true) + max_withdrawable: this.applicationManager.paymentManager.GetMaxPayableInvoice(user.balance_sats, true), + user_identifier: appUser.identifier } } diff --git a/src/services/main/applicationManager.ts b/src/services/main/applicationManager.ts index 6e22602a..902ea4c2 100644 --- a/src/services/main/applicationManager.ts +++ b/src/services/main/applicationManager.ts @@ -102,7 +102,8 @@ export default class { info: { userId: u.user.user_id, balance: u.user.balance_sats, - max_withdrawable: this.paymentManager.GetMaxPayableInvoice(u.user.balance_sats, true) + max_withdrawable: this.paymentManager.GetMaxPayableInvoice(u.user.balance_sats, true), + user_identifier: u.identifier }, max_withdrawable: this.paymentManager.GetMaxPayableInvoice(u.user.balance_sats, true) } @@ -136,7 +137,8 @@ export default class { return { max_withdrawable: max, identifier: req.user_identifier, info: { userId: user.user.user_id, balance: user.user.balance_sats, - max_withdrawable: this.paymentManager.GetMaxPayableInvoice(user.user.balance_sats, true) + max_withdrawable: this.paymentManager.GetMaxPayableInvoice(user.user.balance_sats, true), + user_identifier: user.identifier } } } diff --git a/src/services/main/index.ts b/src/services/main/index.ts index b6e1dc0e..4f5f5adf 100644 --- a/src/services/main/index.ts +++ b/src/services/main/index.ts @@ -8,7 +8,7 @@ import ApplicationManager from './applicationManager.js' import PaymentManager, { PendingTx } from './paymentManager.js' import { MainSettings } from './settings.js' import NewLightningHandler, { LoadLndSettingsFromEnv, LightningHandler } from "../lnd/index.js" -import { AddressPaidCb, InvoicePaidCb, NewBlockCb } from "../lnd/settings.js" +import { AddressPaidCb, HtlcCb, InvoicePaidCb, NewBlockCb } from "../lnd/settings.js" import { getLogger, PubLogger } from "../helpers/logger.js" import AppUserManager from "./appUserManager.js" import { Application } from '../storage/entity/Application.js' @@ -58,8 +58,8 @@ export default class { constructor(settings: MainSettings, storage: Storage) { this.settings = settings this.storage = storage - this.metricsManager = new MetricsManager(this.storage) - this.lnd = NewLightningHandler(settings.lndSettings, this.addressPaidCb, this.invoicePaidCb, this.newBlockCb, e => this.metricsManager.HtlcCb) + this.lnd = NewLightningHandler(settings.lndSettings, this.addressPaidCb, this.invoicePaidCb, this.newBlockCb, this.htlcCb) + this.metricsManager = new MetricsManager(this.storage, this.lnd) this.paymentManager = new PaymentManager(this.storage, this.lnd, this.settings, this.addressPaidCb, this.invoicePaidCb) this.productManager = new ProductManager(this.storage, this.paymentManager, this.settings) @@ -71,6 +71,10 @@ export default class { this.nostrSend = f } + htlcCb: HtlcCb = (e) => { + this.metricsManager.HtlcCb(e) + } + newBlockCb: NewBlockCb = (height) => { this.NewBlockHandler(height) } diff --git a/src/services/metrics/index.ts b/src/services/metrics/index.ts index 01c6cb97..cb2d36cb 100644 --- a/src/services/metrics/index.ts +++ b/src/services/metrics/index.ts @@ -6,12 +6,15 @@ import { RoutingEvent } from '../storage/entity/RoutingEvent.js' import { BalanceInfo } from '../lnd/settings.js' import { BalanceEvent } from '../storage/entity/BalanceEvent.js' import { ChannelBalanceEvent } from '../storage/entity/ChannelsBalanceEvent.js' +import { LightningHandler } from '../lnd/index.js' const maxEvents = 100_000 export default class Handler { storage: Storage + lnd: LightningHandler metrics: Types.UsageMetric[] = [] - constructor(storage: Storage) { + constructor(storage: Storage, lnd: LightningHandler) { this.storage = storage + this.lnd = lnd } async HtlcCb(htlc: HtlcEvent) { @@ -181,7 +184,33 @@ export default class Handler { } } + async GetChannelsInfo() { + const { channels } = await this.lnd.ListChannels() + let totalActive = 0 + let totalInactive = 0 + channels.forEach(c => { + if (c.active) { + totalActive++ + } else { + totalInactive++ + } + }) + return { + totalActive, totalInactive, openChannels: channels + } + } + async GetPendingChannelsInfo() { + const { pendingForceClosingChannels, pendingOpenChannels } = await this.lnd.ListPendingChannels() + return { totalPendingClose: pendingForceClosingChannels.length, totalPendingOpen: pendingOpenChannels.length } + + } + + async GetLndMetrics(req: Types.LndMetricsRequest): Promise { + const { openChannels, totalActive, totalInactive } = await this.GetChannelsInfo() + const { totalPendingOpen, totalPendingClose } = await this.GetPendingChannelsInfo() + const { channels: closedChannels } = await this.lnd.ListClosedChannels() + const routingEvents = await this.storage.metricsStorage.GetRoutingEvents({ from: req.from_unix, to: req.to_unix }) const { channelsBalanceEvents, chainBalanceEvents } = await this.storage.metricsStorage.GetBalanceEvents({ from: req.from_unix, to: req.to_unix }) return { @@ -211,10 +240,15 @@ export default class Handler { outgoing_htlc_id: e.outgoing_htlc_id, settled: e.settled || false, timestamp_ns: e.timestamp_ns + })), + closing_channels: totalPendingClose, + pending_channels: totalPendingOpen, + offline_channels: totalInactive, + online_channels: totalActive, + closed_channels: closedChannels.map(c => ({ capacity: Number(c.capacity), channel_id: c.chanId, closed_height: c.closeHeight })), + open_channels: openChannels.map(c => ({ active: c.active, capacity: Number(c.capacity), channel_id: c.chanId, lifetime: Number(c.lifetime), local_balance: Number(c.localBalance), remote_balance: Number(c.remoteBalance) })) + }], - - })) - }] } } } \ No newline at end of file diff --git a/src/services/nostr/handler.ts b/src/services/nostr/handler.ts index 93858ed2..ffd94424 100644 --- a/src/services/nostr/handler.ts +++ b/src/services/nostr/handler.ts @@ -169,10 +169,21 @@ export default class Handler { } const signed = finishEvent(toSign, appInfo.privateKey) - this.pool.publish(relays || this.settings.relays, signed).forEach(p => { - p.then(() => console.log("sent ok")) - p.catch(() => console.log("failed to send")) - }) + let sent = false + const log = getLogger({ appName: appInfo.name }) + await Promise.all(this.pool.publish(relays || this.settings.relays, signed).map(async p => { + try { + await p + sent = true + } catch (e: any) { + log(e) + } + })) + if (!sent) { + log("failed to send event") + } else { + log("event sent ok") + } } GetAppKeys(appInfo: Partial) { diff --git a/src/services/serverMethods/index.ts b/src/services/serverMethods/index.ts index aa25ed2c..aff1cb28 100644 --- a/src/services/serverMethods/index.ts +++ b/src/services/serverMethods/index.ts @@ -26,6 +26,7 @@ export default (mainHandler: Main): Types.ServerMethods => { if (err != null) throw new Error(err.message) await mainHandler.paymentManager.SetMockInvoiceAsPaid(req) }, + UserHealth: async () => { }, GetUserInfo: ({ ctx }) => mainHandler.appUserManager.GetUserInfo(ctx), GetUserOperations: async ({ ctx, req }) => { return mainHandler.paymentManager.GetUserOperations(ctx.user_id, req)