getUserInfo returns user_identifier as well
This commit is contained in:
parent
a2a9cc5d01
commit
79ca9401e3
6 changed files with 3572 additions and 3548 deletions
|
|
@ -444,29 +444,221 @@ The nostr server will send back a message response, and inside the body there wi
|
||||||
## Messages
|
## Messages
|
||||||
### The content of requests and response from the methods
|
### The content of requests and response from the methods
|
||||||
|
|
||||||
|
### 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_
|
||||||
|
|
||||||
|
### NewAddressRequest
|
||||||
|
- __addressType__: _[AddressType](#AddressType)_
|
||||||
|
|
||||||
|
### 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
|
### Application
|
||||||
- __name__: _string_
|
- __name__: _string_
|
||||||
- __id__: _string_
|
- __id__: _string_
|
||||||
- __balance__: _number_
|
- __balance__: _number_
|
||||||
- __npub__: _string_
|
- __npub__: _string_
|
||||||
|
|
||||||
### NewAddressResponse
|
### AddAppUserInvoiceRequest
|
||||||
- __address__: _string_
|
- __receiver_identifier__: _string_
|
||||||
|
- __payer_identifier__: _string_
|
||||||
|
- __http_callback_url__: _string_
|
||||||
|
- __invoice_req__: _[NewInvoiceRequest](#NewInvoiceRequest)_
|
||||||
|
|
||||||
### LiveUserOperation
|
### GetAppUserRequest
|
||||||
- __operation__: _[UserOperation](#UserOperation)_
|
- __user_identifier__: _string_
|
||||||
|
|
||||||
### UsageMetrics
|
### UsageMetrics
|
||||||
- __metrics__: ARRAY of: _[UsageMetric](#UsageMetric)_
|
- __metrics__: ARRAY of: _[UsageMetric](#UsageMetric)_
|
||||||
|
|
||||||
### SetMockAppUserBalanceRequest
|
### LndGetInfoResponse
|
||||||
- __user_identifier__: _string_
|
- __alias__: _string_
|
||||||
- __amount__: _number_
|
|
||||||
|
|
||||||
### ClosedChannel
|
### LnurlWithdrawInfoResponse
|
||||||
- __channel_id__: _string_
|
- __tag__: _string_
|
||||||
- __capacity__: _number_
|
- __callback__: _string_
|
||||||
- __closed_height__: _number_
|
- __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
|
||||||
|
|
||||||
### RoutingEvent
|
### RoutingEvent
|
||||||
- __incoming_channel_id__: _number_
|
- __incoming_channel_id__: _number_
|
||||||
|
|
@ -482,165 +674,55 @@ The nostr server will send back a message response, and inside the body there wi
|
||||||
- __offchain__: _boolean_
|
- __offchain__: _boolean_
|
||||||
- __forward_fail_event__: _boolean_
|
- __forward_fail_event__: _boolean_
|
||||||
|
|
||||||
### LndGetInfoResponse
|
### AddAppInvoiceRequest
|
||||||
- __alias__: _string_
|
- __payer_identifier__: _string_
|
||||||
|
- __http_callback_url__: _string_
|
||||||
|
- __invoice_req__: _[NewInvoiceRequest](#NewInvoiceRequest)_
|
||||||
|
|
||||||
### GetAppUserRequest
|
### NewInvoiceResponse
|
||||||
- __user_identifier__: _string_
|
- __invoice__: _string_
|
||||||
|
|
||||||
### LnurlWithdrawInfoResponse
|
|
||||||
- __tag__: _string_
|
|
||||||
- __callback__: _string_
|
|
||||||
- __k1__: _string_
|
|
||||||
- __defaultDescription__: _string_
|
|
||||||
- __minWithdrawable__: _number_
|
|
||||||
- __maxWithdrawable__: _number_
|
|
||||||
- __balanceCheck__: _string_
|
|
||||||
- __payLink__: _string_
|
|
||||||
|
|
||||||
### Empty
|
|
||||||
|
|
||||||
### LnurlLinkResponse
|
|
||||||
- __lnurl__: _string_
|
|
||||||
- __k1__: _string_
|
|
||||||
|
|
||||||
### GetUserOperationsRequest
|
|
||||||
- __latestIncomingInvoice__: _number_
|
|
||||||
- __latestOutgoingInvoice__: _number_
|
|
||||||
- __latestIncomingTx__: _number_
|
|
||||||
- __latestOutgoingTx__: _number_
|
|
||||||
- __latestIncomingUserToUserPayment__: _number_
|
|
||||||
- __latestOutgoingUserToUserPayment__: _number_
|
|
||||||
|
|
||||||
### AddAppUserRequest
|
|
||||||
- __identifier__: _string_
|
|
||||||
- __fail_if_exists__: _boolean_
|
|
||||||
- __balance__: _number_
|
|
||||||
|
|
||||||
### PayAddressRequest
|
|
||||||
- __address__: _string_
|
|
||||||
- __amoutSats__: _number_
|
|
||||||
- __satsPerVByte__: _number_
|
|
||||||
|
|
||||||
### PayAddressResponse
|
|
||||||
- __txId__: _string_
|
|
||||||
- __operation_id__: _string_
|
|
||||||
- __service_fee__: _number_
|
|
||||||
- __network_fee__: _number_
|
|
||||||
|
|
||||||
### OpenChannelResponse
|
|
||||||
- __channelId__: _string_
|
|
||||||
|
|
||||||
### AddProductRequest
|
|
||||||
- __name__: _string_
|
|
||||||
- __price_sats__: _number_
|
|
||||||
|
|
||||||
### Product
|
### Product
|
||||||
- __id__: _string_
|
- __id__: _string_
|
||||||
- __name__: _string_
|
- __name__: _string_
|
||||||
- __price_sats__: _number_
|
- __price_sats__: _number_
|
||||||
|
|
||||||
### AppsMetrics
|
### UsageMetric
|
||||||
- __apps__: ARRAY of: _[AppMetrics](#AppMetrics)_
|
- __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_
|
||||||
|
|
||||||
### SendAppUserToAppPaymentRequest
|
### AddAppUserRequest
|
||||||
- __from_user_identifier__: _string_
|
- __identifier__: _string_
|
||||||
- __amount__: _number_
|
- __fail_if_exists__: _boolean_
|
||||||
|
- __balance__: _number_
|
||||||
### PayInvoiceRequest
|
|
||||||
- __invoice__: _string_
|
|
||||||
- __amount__: _number_
|
|
||||||
|
|
||||||
### PayInvoiceResponse
|
|
||||||
- __preimage__: _string_
|
|
||||||
- __amount_paid__: _number_
|
|
||||||
- __operation_id__: _string_
|
|
||||||
- __service_fee__: _number_
|
|
||||||
- __network_fee__: _number_
|
|
||||||
|
|
||||||
### MigrationUpdate
|
|
||||||
- __closure__: _[ClosureMigration](#ClosureMigration)_ *this field is optional
|
|
||||||
- __relays__: _[RelaysMigration](#RelaysMigration)_ *this field is optional
|
|
||||||
|
|
||||||
### ChainBalanceEvent
|
|
||||||
- __block_height__: _number_
|
|
||||||
- __confirmed_balance__: _number_
|
|
||||||
- __unconfirmed_balance__: _number_
|
|
||||||
- __total_balance__: _number_
|
|
||||||
|
|
||||||
### GetAppUserLNURLInfoRequest
|
|
||||||
- __user_identifier__: _string_
|
|
||||||
- __base_url_override__: _string_
|
|
||||||
|
|
||||||
### SetMockAppBalanceRequest
|
|
||||||
- __amount__: _number_
|
|
||||||
|
|
||||||
### NewInvoiceResponse
|
|
||||||
- __invoice__: _string_
|
|
||||||
|
|
||||||
### DecodeInvoiceResponse
|
|
||||||
- __amount__: _number_
|
|
||||||
|
|
||||||
### SetMockInvoiceAsPaidRequest
|
|
||||||
- __invoice__: _string_
|
|
||||||
- __amount__: _number_
|
|
||||||
|
|
||||||
### LndMetricsRequest
|
|
||||||
- __from_unix__: _number_ *this field is optional
|
|
||||||
- __to_unix__: _number_ *this field is optional
|
|
||||||
|
|
||||||
### AppsMetricsRequest
|
|
||||||
- __from_unix__: _number_ *this field is optional
|
|
||||||
- __to_unix__: _number_ *this field is optional
|
|
||||||
- __include_operations__: _boolean_ *this field is optional
|
|
||||||
|
|
||||||
### OpenChannel
|
|
||||||
- __channel_id__: _string_
|
|
||||||
- __capacity__: _number_
|
|
||||||
- __active__: _boolean_
|
|
||||||
- __lifetime__: _number_
|
|
||||||
- __local_balance__: _number_
|
|
||||||
- __remote_balance__: _number_
|
|
||||||
|
|
||||||
### NewInvoiceRequest
|
|
||||||
- __amountSats__: _number_
|
|
||||||
- __memo__: _string_
|
|
||||||
|
|
||||||
### EncryptionExchangeRequest
|
|
||||||
- __publicKey__: _string_
|
|
||||||
- __deviceId__: _string_
|
|
||||||
|
|
||||||
### AddAppUserInvoiceRequest
|
|
||||||
- __receiver_identifier__: _string_
|
|
||||||
- __payer_identifier__: _string_
|
|
||||||
- __http_callback_url__: _string_
|
|
||||||
- __invoice_req__: _[NewInvoiceRequest](#NewInvoiceRequest)_
|
|
||||||
|
|
||||||
### PayAppUserInvoiceRequest
|
|
||||||
- __user_identifier__: _string_
|
|
||||||
- __invoice__: _string_
|
|
||||||
- __amount__: _number_
|
|
||||||
|
|
||||||
### NewAddressRequest
|
|
||||||
- __addressType__: _[AddressType](#AddressType)_
|
|
||||||
|
|
||||||
### HandleLnurlPayResponse
|
### HandleLnurlPayResponse
|
||||||
- __pr__: _string_
|
- __pr__: _string_
|
||||||
- __routes__: ARRAY of: _[Empty](#Empty)_
|
- __routes__: ARRAY of: _[Empty](#Empty)_
|
||||||
|
|
||||||
### AuthApp
|
### GetUserOperationsResponse
|
||||||
- __app__: _[Application](#Application)_
|
- __latestOutgoingInvoiceOperations__: _[UserOperations](#UserOperations)_
|
||||||
- __auth_token__: _string_
|
- __latestIncomingInvoiceOperations__: _[UserOperations](#UserOperations)_
|
||||||
|
- __latestOutgoingTxOperations__: _[UserOperations](#UserOperations)_
|
||||||
|
- __latestIncomingTxOperations__: _[UserOperations](#UserOperations)_
|
||||||
|
- __latestOutgoingUserToUserPayemnts__: _[UserOperations](#UserOperations)_
|
||||||
|
- __latestIncomingUserToUserPayemnts__: _[UserOperations](#UserOperations)_
|
||||||
|
|
||||||
### OpenChannelRequest
|
### LiveUserOperation
|
||||||
- __destination__: _string_
|
- __operation__: _[UserOperation](#UserOperation)_
|
||||||
- __fundingAmount__: _number_
|
|
||||||
- __pushAmount__: _number_
|
|
||||||
- __closeAddress__: _string_
|
|
||||||
|
|
||||||
### AddAppRequest
|
### ClosureMigration
|
||||||
- __name__: _string_
|
- __closes_at_unix__: _number_
|
||||||
- __allow_user_creation__: _boolean_
|
|
||||||
|
### RelaysMigration
|
||||||
|
- __relays__: ARRAY of: _string_
|
||||||
|
|
||||||
### LndNodeMetrics
|
### LndNodeMetrics
|
||||||
- __channels_balance_events__: ARRAY of: _[ChannelBalanceEvent](#ChannelBalanceEvent)_
|
- __channels_balance_events__: ARRAY of: _[ChannelBalanceEvent](#ChannelBalanceEvent)_
|
||||||
|
|
@ -653,114 +735,33 @@ The nostr server will send back a message response, and inside the body there wi
|
||||||
- __open_channels__: ARRAY of: _[OpenChannel](#OpenChannel)_
|
- __open_channels__: ARRAY of: _[OpenChannel](#OpenChannel)_
|
||||||
- __closed_channels__: ARRAY of: _[ClosedChannel](#ClosedChannel)_
|
- __closed_channels__: ARRAY of: _[ClosedChannel](#ClosedChannel)_
|
||||||
|
|
||||||
### AuthAppRequest
|
### PayAddressResponse
|
||||||
- __name__: _string_
|
- __txId__: _string_
|
||||||
- __allow_user_creation__: _boolean_ *this field is optional
|
- __operation_id__: _string_
|
||||||
|
|
||||||
### DecodeInvoiceRequest
|
|
||||||
- __invoice__: _string_
|
|
||||||
|
|
||||||
### ChannelBalanceEvent
|
|
||||||
- __block_height__: _number_
|
|
||||||
- __channel_id__: _string_
|
|
||||||
- __local_balance_sats__: _number_
|
|
||||||
- __remote_balance_sats__: _number_
|
|
||||||
|
|
||||||
### LndGetInfoRequest
|
|
||||||
- __nodeId__: _number_
|
|
||||||
|
|
||||||
### LnurlPayInfoResponse
|
|
||||||
- __tag__: _string_
|
|
||||||
- __callback__: _string_
|
|
||||||
- __maxSendable__: _number_
|
|
||||||
- __minSendable__: _number_
|
|
||||||
- __metadata__: _string_
|
|
||||||
- __allowsNostr__: _boolean_
|
|
||||||
- __nostrPubkey__: _string_
|
|
||||||
|
|
||||||
### UserOperation
|
|
||||||
- __paidAtUnix__: _number_
|
|
||||||
- __type__: _[UserOperationType](#UserOperationType)_
|
|
||||||
- __inbound__: _boolean_
|
|
||||||
- __amount__: _number_
|
|
||||||
- __identifier__: _string_
|
|
||||||
- __operationId__: _string_
|
|
||||||
- __service_fee__: _number_
|
- __service_fee__: _number_
|
||||||
- __network_fee__: _number_
|
- __network_fee__: _number_
|
||||||
- __confirmed__: _boolean_
|
|
||||||
|
### LndMetrics
|
||||||
|
- __nodes__: ARRAY of: _[LndNodeMetrics](#LndNodeMetrics)_
|
||||||
|
|
||||||
|
### PayAppUserInvoiceRequest
|
||||||
|
- __user_identifier__: _string_
|
||||||
|
- __invoice__: _string_
|
||||||
|
- __amount__: _number_
|
||||||
|
|
||||||
|
### PayAddressRequest
|
||||||
|
- __address__: _string_
|
||||||
|
- __amoutSats__: _number_
|
||||||
|
- __satsPerVByte__: _number_
|
||||||
|
|
||||||
### UserOperations
|
### UserOperations
|
||||||
- __fromIndex__: _number_
|
- __fromIndex__: _number_
|
||||||
- __toIndex__: _number_
|
- __toIndex__: _number_
|
||||||
- __operations__: ARRAY of: _[UserOperation](#UserOperation)_
|
- __operations__: ARRAY of: _[UserOperation](#UserOperation)_
|
||||||
|
|
||||||
### GetUserOperationsResponse
|
### SetMockInvoiceAsPaidRequest
|
||||||
- __latestOutgoingInvoiceOperations__: _[UserOperations](#UserOperations)_
|
- __invoice__: _string_
|
||||||
- __latestIncomingInvoiceOperations__: _[UserOperations](#UserOperations)_
|
|
||||||
- __latestOutgoingTxOperations__: _[UserOperations](#UserOperations)_
|
|
||||||
- __latestIncomingTxOperations__: _[UserOperations](#UserOperations)_
|
|
||||||
- __latestOutgoingUserToUserPayemnts__: _[UserOperations](#UserOperations)_
|
|
||||||
- __latestIncomingUserToUserPayemnts__: _[UserOperations](#UserOperations)_
|
|
||||||
|
|
||||||
### GetProductBuyLinkResponse
|
|
||||||
- __link__: _string_
|
|
||||||
|
|
||||||
### ClosureMigration
|
|
||||||
- __closes_at_unix__: _number_
|
|
||||||
|
|
||||||
### UsersInfo
|
|
||||||
- __total__: _number_
|
|
||||||
- __no_balance__: _number_
|
|
||||||
- __negative_balance__: _number_
|
|
||||||
- __always_been_inactive__: _number_
|
|
||||||
- __balance_avg__: _number_
|
|
||||||
- __balance_median__: _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)_
|
|
||||||
|
|
||||||
### LndMetrics
|
|
||||||
- __nodes__: ARRAY of: _[LndNodeMetrics](#LndNodeMetrics)_
|
|
||||||
|
|
||||||
### AppUser
|
|
||||||
- __identifier__: _string_
|
|
||||||
- __info__: _[UserInfo](#UserInfo)_
|
|
||||||
- __max_withdrawable__: _number_
|
|
||||||
|
|
||||||
### AddAppInvoiceRequest
|
|
||||||
- __payer_identifier__: _string_
|
|
||||||
- __http_callback_url__: _string_
|
|
||||||
- __invoice_req__: _[NewInvoiceRequest](#NewInvoiceRequest)_
|
|
||||||
|
|
||||||
### SendAppUserToAppUserPaymentRequest
|
|
||||||
- __from_user_identifier__: _string_
|
|
||||||
- __to_user_identifier__: _string_
|
|
||||||
- __amount__: _number_
|
- __amount__: _number_
|
||||||
|
|
||||||
### UserInfo
|
|
||||||
- __userId__: _string_
|
|
||||||
- __balance__: _number_
|
|
||||||
- __max_withdrawable__: _number_
|
|
||||||
|
|
||||||
### RelaysMigration
|
|
||||||
- __relays__: ARRAY of: _string_
|
|
||||||
|
|
||||||
### UsageMetric
|
|
||||||
- __processed_at_ms__: _number_
|
|
||||||
- __parsed_in_nano__: _number_
|
|
||||||
- __auth_in_nano__: _number_
|
|
||||||
- __validate_in_nano__: _number_
|
|
||||||
- __handle_in_nano__: _number_
|
|
||||||
- __rpc_name__: _string_
|
|
||||||
- __batch__: _boolean_
|
|
||||||
- __nostr__: _boolean_
|
|
||||||
- __batch_size__: _number_
|
|
||||||
## Enums
|
## Enums
|
||||||
### The enumerators used in the messages
|
### The enumerators used in the messages
|
||||||
|
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -318,6 +318,7 @@ message UserInfo{
|
||||||
string userId = 1;
|
string userId = 1;
|
||||||
int64 balance = 2;
|
int64 balance = 2;
|
||||||
int64 max_withdrawable = 3;
|
int64 max_withdrawable = 3;
|
||||||
|
string user_identifier = 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
message GetUserOperationsRequest{
|
message GetUserOperationsRequest{
|
||||||
|
|
|
||||||
|
|
@ -33,10 +33,16 @@ export default class {
|
||||||
|
|
||||||
async GetUserInfo(ctx: Types.UserContext): Promise<Types.UserInfo> {
|
async GetUserInfo(ctx: Types.UserContext): Promise<Types.UserInfo> {
|
||||||
const user = await this.storage.userStorage.GetUser(ctx.user_id)
|
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 {
|
return {
|
||||||
userId: ctx.user_id,
|
userId: ctx.user_id,
|
||||||
balance: user.balance_sats,
|
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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -102,7 +102,8 @@ export default class {
|
||||||
info: {
|
info: {
|
||||||
userId: u.user.user_id,
|
userId: u.user.user_id,
|
||||||
balance: u.user.balance_sats,
|
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)
|
max_withdrawable: this.paymentManager.GetMaxPayableInvoice(u.user.balance_sats, true)
|
||||||
}
|
}
|
||||||
|
|
@ -136,7 +137,8 @@ export default class {
|
||||||
return {
|
return {
|
||||||
max_withdrawable: max, identifier: req.user_identifier, info: {
|
max_withdrawable: max, identifier: req.user_identifier, info: {
|
||||||
userId: user.user.user_id, balance: user.user.balance_sats,
|
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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue