fix merge
This commit is contained in:
parent
4fd8f44e82
commit
c4ae17d8bc
5 changed files with 4906 additions and 5415 deletions
|
|
@ -190,9 +190,9 @@ The nostr server will send back a message response, and inside the body there wi
|
||||||
|
|
||||||
- __User__:
|
- __User__:
|
||||||
- expected context content
|
- expected context content
|
||||||
|
- __user_id__: _string_
|
||||||
- __app_id__: _string_
|
- __app_id__: _string_
|
||||||
- __app_user_id__: _string_
|
- __app_user_id__: _string_
|
||||||
- __user_id__: _string_
|
|
||||||
|
|
||||||
- __Admin__:
|
- __Admin__:
|
||||||
- expected context content
|
- expected context content
|
||||||
|
|
@ -208,8 +208,8 @@ The nostr server will send back a message response, and inside the body there wi
|
||||||
|
|
||||||
- __GuestWithPub__:
|
- __GuestWithPub__:
|
||||||
- expected context content
|
- expected context content
|
||||||
- __pub__: _string_
|
|
||||||
- __app_id__: _string_
|
- __app_id__: _string_
|
||||||
|
- __pub__: _string_
|
||||||
|
|
||||||
## HTTP Methods
|
## HTTP Methods
|
||||||
### These are the http methods the client implements to communicate with the API
|
### These are the http methods the client implements to communicate with the API
|
||||||
|
|
@ -613,165 +613,66 @@ 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
|
||||||
|
|
||||||
### AuthAppRequest
|
### AppsMetrics
|
||||||
- __name__: _string_
|
- __apps__: ARRAY of: _[AppMetrics](#AppMetrics)_
|
||||||
- __allow_user_creation__: _boolean_ *this field is optional
|
|
||||||
|
|
||||||
### Application
|
### NewInvoiceRequest
|
||||||
- __name__: _string_
|
- __amountSats__: _number_
|
||||||
- __id__: _string_
|
- __memo__: _string_
|
||||||
- __balance__: _number_
|
|
||||||
- __npub__: _string_
|
|
||||||
|
|
||||||
### DecodeInvoiceRequest
|
### NewInvoiceResponse
|
||||||
- __invoice__: _string_
|
- __invoice__: _string_
|
||||||
|
|
||||||
### OpenChannel
|
### SetMockAppUserBalanceRequest
|
||||||
- __channel_id__: _string_
|
|
||||||
- __capacity__: _number_
|
|
||||||
- __active__: _boolean_
|
|
||||||
- __lifetime__: _number_
|
|
||||||
- __local_balance__: _number_
|
|
||||||
- __remote_balance__: _number_
|
|
||||||
- __label__: _string_
|
|
||||||
|
|
||||||
### ChannelRouting
|
|
||||||
- __send_errors__: _number_
|
|
||||||
- __receive_errors__: _number_
|
|
||||||
- __missed_forward_fee_as_output__: _number_
|
|
||||||
- __events_number__: _number_
|
|
||||||
- __channel_id__: _string_
|
|
||||||
- __forward_errors_as_input__: _number_
|
|
||||||
- __forward_errors_as_output__: _number_
|
|
||||||
- __missed_forward_fee_as_input__: _number_
|
|
||||||
- __forward_fee_as_input__: _number_
|
|
||||||
- __forward_fee_as_output__: _number_
|
|
||||||
|
|
||||||
### ChainBalanceEvent
|
|
||||||
- __block_height__: _number_
|
|
||||||
- __confirmed_balance__: _number_
|
|
||||||
- __unconfirmed_balance__: _number_
|
|
||||||
- __total_balance__: _number_
|
|
||||||
|
|
||||||
### GetPaymentStateRequest
|
|
||||||
- __invoice__: _string_
|
|
||||||
|
|
||||||
### EncryptionExchangeRequest
|
|
||||||
- __deviceId__: _string_
|
|
||||||
- __publicKey__: _string_
|
|
||||||
|
|
||||||
### ChannelBalanceEvent
|
|
||||||
- __block_height__: _number_
|
|
||||||
- __channel_id__: _string_
|
|
||||||
- __local_balance_sats__: _number_
|
|
||||||
- __remote_balance_sats__: _number_
|
|
||||||
|
|
||||||
### HandleLnurlPayResponse
|
|
||||||
- __pr__: _string_
|
|
||||||
- __routes__: ARRAY of: _[Empty](#Empty)_
|
|
||||||
|
|
||||||
### LiveUserOperation
|
|
||||||
- __operation__: _[UserOperation](#UserOperation)_
|
|
||||||
|
|
||||||
### RequestNPubLinkingTokenRequest
|
|
||||||
- __user_identifier__: _string_
|
- __user_identifier__: _string_
|
||||||
|
- __amount__: _number_
|
||||||
|
|
||||||
|
### PayAddressRequest
|
||||||
|
- __address__: _string_
|
||||||
|
- __amoutSats__: _number_
|
||||||
|
- __satsPerVByte__: _number_
|
||||||
|
|
||||||
### HttpCreds
|
### HttpCreds
|
||||||
- __url__: _string_
|
- __url__: _string_
|
||||||
- __token__: _string_
|
- __token__: _string_
|
||||||
|
|
||||||
### AppsMetricsRequest
|
### CreateOneTimeInviteLinkResponse
|
||||||
- __from_unix__: _number_ *this field is optional
|
- __invitation_link__: _string_
|
||||||
- __to_unix__: _number_ *this field is optional
|
|
||||||
- __include_operations__: _boolean_ *this field is optional
|
|
||||||
|
|
||||||
### LnurlWithdrawInfoResponse
|
### UseInviteLinkRequest
|
||||||
- __balanceCheck__: _string_
|
- __invite_token__: _string_
|
||||||
- __payLink__: _string_
|
|
||||||
- __tag__: _string_
|
|
||||||
- __callback__: _string_
|
|
||||||
- __k1__: _string_
|
|
||||||
- __defaultDescription__: _string_
|
|
||||||
- __minWithdrawable__: _number_
|
|
||||||
- __maxWithdrawable__: _number_
|
|
||||||
|
|
||||||
### NewInvoiceRequest
|
|
||||||
- __memo__: _string_
|
|
||||||
- __amountSats__: _number_
|
|
||||||
|
|
||||||
### DecodeInvoiceResponse
|
|
||||||
- __amount__: _number_
|
|
||||||
|
|
||||||
### UserInfo
|
|
||||||
- __service_fee_bps__: _number_
|
|
||||||
- __network_max_fee_bps__: _number_
|
|
||||||
- __network_max_fee_fixed__: _number_
|
|
||||||
- __userId__: _string_
|
|
||||||
- __balance__: _number_
|
|
||||||
- __max_withdrawable__: _number_
|
|
||||||
- __user_identifier__: _string_
|
|
||||||
|
|
||||||
### SetMockInvoiceAsPaidRequest
|
|
||||||
- __invoice__: _string_
|
|
||||||
- __amount__: _number_
|
|
||||||
|
|
||||||
### SendAppUserToAppPaymentRequest
|
|
||||||
- __from_user_identifier__: _string_
|
|
||||||
- __amount__: _number_
|
|
||||||
|
|
||||||
### GetAppUserLNURLInfoRequest
|
|
||||||
- __user_identifier__: _string_
|
|
||||||
- __base_url_override__: _string_
|
|
||||||
|
|
||||||
### GetProductBuyLinkResponse
|
|
||||||
- __link__: _string_
|
|
||||||
|
|
||||||
### LndMetrics
|
|
||||||
- __nodes__: ARRAY of: _[LndNodeMetrics](#LndNodeMetrics)_
|
|
||||||
|
|
||||||
### AddAppUserRequest
|
|
||||||
- __balance__: _number_
|
|
||||||
- __identifier__: _string_
|
|
||||||
- __fail_if_exists__: _boolean_
|
|
||||||
|
|
||||||
### BanUserResponse
|
|
||||||
- __balance_sats__: _number_
|
|
||||||
- __banned_app_users__: ARRAY of: _[BannedAppUser](#BannedAppUser)_
|
|
||||||
|
|
||||||
### GetUserOperationsRequest
|
|
||||||
- __latestIncomingInvoice__: _number_
|
|
||||||
- __latestOutgoingInvoice__: _number_
|
|
||||||
- __latestIncomingTx__: _number_
|
|
||||||
- __latestOutgoingTx__: _number_
|
|
||||||
- __latestIncomingUserToUserPayment__: _number_
|
|
||||||
- __latestOutgoingUserToUserPayment__: _number_
|
|
||||||
- __max_size__: _number_
|
|
||||||
|
|
||||||
### MigrationUpdate
|
|
||||||
- __closure__: _[ClosureMigration](#ClosureMigration)_ *this field is optional
|
|
||||||
- __relays__: _[RelaysMigration](#RelaysMigration)_ *this field is optional
|
|
||||||
|
|
||||||
### LinkNPubThroughTokenRequest
|
|
||||||
- __token__: _string_
|
|
||||||
|
|
||||||
### LndGetInfoRequest
|
|
||||||
- __nodeId__: _number_
|
|
||||||
|
|
||||||
### BannedAppUser
|
|
||||||
- __app_name__: _string_
|
|
||||||
- __app_id__: _string_
|
|
||||||
- __user_identifier__: _string_
|
|
||||||
- __nostr_pub__: _string_
|
|
||||||
|
|
||||||
### Application
|
|
||||||
- __id__: _string_
|
|
||||||
- __balance__: _number_
|
|
||||||
- __npub__: _string_
|
|
||||||
- __name__: _string_
|
|
||||||
|
|
||||||
### GetInviteTokenStateResponse
|
### GetInviteTokenStateResponse
|
||||||
- __used__: _boolean_
|
- __used__: _boolean_
|
||||||
|
|
||||||
|
### ClosedChannel
|
||||||
|
- __channel_id__: _string_
|
||||||
|
- __capacity__: _number_
|
||||||
|
- __closed_height__: _number_
|
||||||
|
|
||||||
|
### NewAddressResponse
|
||||||
|
- __address__: _string_
|
||||||
|
|
||||||
|
### DecodeInvoiceRequest
|
||||||
|
- __invoice__: _string_
|
||||||
|
|
||||||
|
### GetUserOperationsResponse
|
||||||
|
- __latestOutgoingInvoiceOperations__: _[UserOperations](#UserOperations)_
|
||||||
|
- __latestIncomingInvoiceOperations__: _[UserOperations](#UserOperations)_
|
||||||
|
- __latestOutgoingTxOperations__: _[UserOperations](#UserOperations)_
|
||||||
|
- __latestIncomingTxOperations__: _[UserOperations](#UserOperations)_
|
||||||
|
- __latestOutgoingUserToUserPayemnts__: _[UserOperations](#UserOperations)_
|
||||||
|
- __latestIncomingUserToUserPayemnts__: _[UserOperations](#UserOperations)_
|
||||||
|
|
||||||
|
### AddProductRequest
|
||||||
|
- __name__: _string_
|
||||||
|
- __price_sats__: _number_
|
||||||
|
|
||||||
|
### SendAppUserToAppUserPaymentRequest
|
||||||
|
- __from_user_identifier__: _string_
|
||||||
|
- __to_user_identifier__: _string_
|
||||||
|
- __amount__: _number_
|
||||||
|
|
||||||
### PayInvoiceResponse
|
### PayInvoiceResponse
|
||||||
- __preimage__: _string_
|
- __preimage__: _string_
|
||||||
- __amount_paid__: _number_
|
- __amount_paid__: _number_
|
||||||
|
|
@ -782,73 +683,260 @@ The nostr server will send back a message response, and inside the body there wi
|
||||||
### OpenChannelResponse
|
### OpenChannelResponse
|
||||||
- __channelId__: _string_
|
- __channelId__: _string_
|
||||||
|
|
||||||
### PayAddressResponse
|
### LndChannels
|
||||||
- __service_fee__: _number_
|
- __open_channels__: ARRAY of: _[OpenChannel](#OpenChannel)_
|
||||||
- __network_fee__: _number_
|
|
||||||
- __txId__: _string_
|
|
||||||
- __operation_id__: _string_
|
|
||||||
|
|
||||||
### PaymentState
|
### BanUserRequest
|
||||||
- __network_fee__: _number_
|
- __user_id__: _string_
|
||||||
- __paid_at_unix__: _number_
|
|
||||||
|
### GetAppUserLNURLInfoRequest
|
||||||
|
- __user_identifier__: _string_
|
||||||
|
- __base_url_override__: _string_
|
||||||
|
|
||||||
|
### DecodeInvoiceResponse
|
||||||
- __amount__: _number_
|
- __amount__: _number_
|
||||||
- __service_fee__: _number_
|
|
||||||
|
### GetProductBuyLinkResponse
|
||||||
|
- __link__: _string_
|
||||||
|
|
||||||
|
### MigrationUpdate
|
||||||
|
- __closure__: _[ClosureMigration](#ClosureMigration)_ *this field is optional
|
||||||
|
- __relays__: _[RelaysMigration](#RelaysMigration)_ *this field is optional
|
||||||
|
|
||||||
### UsersInfo
|
### UsersInfo
|
||||||
- __no_balance__: _number_
|
|
||||||
- __negative_balance__: _number_
|
|
||||||
- __always_been_inactive__: _number_
|
- __always_been_inactive__: _number_
|
||||||
- __balance_avg__: _number_
|
- __balance_avg__: _number_
|
||||||
- __balance_median__: _number_
|
- __balance_median__: _number_
|
||||||
- __total__: _number_
|
- __total__: _number_
|
||||||
|
- __no_balance__: _number_
|
||||||
|
- __negative_balance__: _number_
|
||||||
|
|
||||||
### LndGetInfoResponse
|
### RoutingEvent
|
||||||
- __alias__: _string_
|
- __offchain__: _boolean_
|
||||||
|
- __outgoing_channel_id__: _number_
|
||||||
|
- __outgoing_htlc_id__: _number_
|
||||||
|
- __event_type__: _string_
|
||||||
|
- __incoming_amt_msat__: _number_
|
||||||
|
- __failure_string__: _string_
|
||||||
|
- __forward_fail_event__: _boolean_
|
||||||
|
- __incoming_channel_id__: _number_
|
||||||
|
- __incoming_htlc_id__: _number_
|
||||||
|
- __timestamp_ns__: _number_
|
||||||
|
- __outgoing_amt_msat__: _number_
|
||||||
|
- __settled__: _boolean_
|
||||||
|
|
||||||
### LndMetricsRequest
|
### OpenChannel
|
||||||
- __to_unix__: _number_ *this field is optional
|
- __capacity__: _number_
|
||||||
- __from_unix__: _number_ *this field is optional
|
- __active__: _boolean_
|
||||||
|
- __lifetime__: _number_
|
||||||
|
- __local_balance__: _number_
|
||||||
|
- __remote_balance__: _number_
|
||||||
|
- __label__: _string_
|
||||||
|
- __channel_id__: _string_
|
||||||
|
|
||||||
### SetMockAppUserBalanceRequest
|
### AddAppUserInvoiceRequest
|
||||||
|
- __http_callback_url__: _string_
|
||||||
|
- __invoice_req__: _[NewInvoiceRequest](#NewInvoiceRequest)_
|
||||||
|
- __receiver_identifier__: _string_
|
||||||
|
- __payer_identifier__: _string_
|
||||||
|
|
||||||
|
### PayInvoiceRequest
|
||||||
|
- __invoice__: _string_
|
||||||
- __amount__: _number_
|
- __amount__: _number_
|
||||||
- __user_identifier__: _string_
|
|
||||||
|
|
||||||
### RelaysMigration
|
### LnurlWithdrawInfoResponse
|
||||||
- __relays__: ARRAY of: _string_
|
- __tag__: _string_
|
||||||
|
- __callback__: _string_
|
||||||
|
- __k1__: _string_
|
||||||
|
- __defaultDescription__: _string_
|
||||||
|
- __minWithdrawable__: _number_
|
||||||
|
- __maxWithdrawable__: _number_
|
||||||
|
- __balanceCheck__: _string_
|
||||||
|
- __payLink__: _string_
|
||||||
|
|
||||||
### UsageMetric
|
### HandleLnurlPayResponse
|
||||||
- __rpc_name__: _string_
|
- __routes__: ARRAY of: _[Empty](#Empty)_
|
||||||
- __batch__: _boolean_
|
- __pr__: _string_
|
||||||
- __nostr__: _boolean_
|
|
||||||
- __processed_at_ms__: _number_
|
### LinkNPubThroughTokenRequest
|
||||||
- __auth_in_nano__: _number_
|
- __token__: _string_
|
||||||
- __handle_in_nano__: _number_
|
|
||||||
- __batch_size__: _number_
|
|
||||||
- __parsed_in_nano__: _number_
|
|
||||||
- __validate_in_nano__: _number_
|
|
||||||
|
|
||||||
### AppUser
|
### AppUser
|
||||||
- __identifier__: _string_
|
- __identifier__: _string_
|
||||||
- __info__: _[UserInfo](#UserInfo)_
|
- __info__: _[UserInfo](#UserInfo)_
|
||||||
- __max_withdrawable__: _number_
|
- __max_withdrawable__: _number_
|
||||||
|
|
||||||
### PayAddressRequest
|
### NewAddressRequest
|
||||||
- __address__: _string_
|
- __addressType__: _[AddressType](#AddressType)_
|
||||||
- __amoutSats__: _number_
|
|
||||||
- __satsPerVByte__: _number_
|
|
||||||
|
|
||||||
### LnurlLinkResponse
|
### GetPaymentStateRequest
|
||||||
- __lnurl__: _string_
|
- __invoice__: _string_
|
||||||
- __k1__: _string_
|
|
||||||
|
|
||||||
### CreateOneTimeInviteLinkResponse
|
### PaymentState
|
||||||
- __invitation_link__: _string_
|
- __paid_at_unix__: _number_
|
||||||
|
- __amount__: _number_
|
||||||
|
- __service_fee__: _number_
|
||||||
|
- __network_fee__: _number_
|
||||||
|
|
||||||
|
### LndMetrics
|
||||||
|
- __nodes__: ARRAY of: _[LndNodeMetrics](#LndNodeMetrics)_
|
||||||
|
|
||||||
|
### LndGetInfoResponse
|
||||||
|
- __alias__: _string_
|
||||||
|
|
||||||
|
### AddAppUserRequest
|
||||||
|
- __identifier__: _string_
|
||||||
|
- __fail_if_exists__: _boolean_
|
||||||
|
- __balance__: _number_
|
||||||
|
|
||||||
|
### SetMockAppBalanceRequest
|
||||||
|
- __amount__: _number_
|
||||||
|
|
||||||
|
### GetUserOperationsRequest
|
||||||
|
- __latestIncomingTx__: _number_
|
||||||
|
- __latestOutgoingTx__: _number_
|
||||||
|
- __latestIncomingUserToUserPayment__: _number_
|
||||||
|
- __latestOutgoingUserToUserPayment__: _number_
|
||||||
|
- __max_size__: _number_
|
||||||
|
- __latestIncomingInvoice__: _number_
|
||||||
|
- __latestOutgoingInvoice__: _number_
|
||||||
|
|
||||||
|
### Product
|
||||||
|
- __id__: _string_
|
||||||
|
- __name__: _string_
|
||||||
|
- __price_sats__: _number_
|
||||||
|
|
||||||
|
### RequestNPubLinkingTokenRequest
|
||||||
|
- __user_identifier__: _string_
|
||||||
|
|
||||||
|
### AppMetrics
|
||||||
|
- __app__: _[Application](#Application)_
|
||||||
|
- __users__: _[UsersInfo](#UsersInfo)_
|
||||||
|
- __available__: _number_
|
||||||
|
- __total_fees__: _number_
|
||||||
|
- __received__: _number_
|
||||||
|
- __spent__: _number_
|
||||||
|
- __fees__: _number_
|
||||||
|
- __invoices__: _number_
|
||||||
|
- __operations__: ARRAY of: _[UserOperation](#UserOperation)_
|
||||||
|
|
||||||
|
### AddAppInvoiceRequest
|
||||||
|
- __invoice_req__: _[NewInvoiceRequest](#NewInvoiceRequest)_
|
||||||
|
- __payer_identifier__: _string_
|
||||||
|
- __http_callback_url__: _string_
|
||||||
|
|
||||||
|
### UserOperation
|
||||||
|
- __identifier__: _string_
|
||||||
|
- __service_fee__: _number_
|
||||||
|
- __network_fee__: _number_
|
||||||
|
- __tx_hash__: _string_
|
||||||
|
- __paidAtUnix__: _number_
|
||||||
|
- __type__: _[UserOperationType](#UserOperationType)_
|
||||||
|
- __inbound__: _boolean_
|
||||||
|
- __amount__: _number_
|
||||||
|
- __operationId__: _string_
|
||||||
|
- __confirmed__: _boolean_
|
||||||
|
- __internal__: _boolean_
|
||||||
|
|
||||||
|
### RequestNPubLinkingTokenResponse
|
||||||
|
- __token__: _string_
|
||||||
|
|
||||||
|
### CreateOneTimeInviteLinkRequest
|
||||||
|
- __sats__: _number_ *this field is optional
|
||||||
|
|
||||||
|
### LndMetricsRequest
|
||||||
|
- __from_unix__: _number_ *this field is optional
|
||||||
|
- __to_unix__: _number_ *this field is optional
|
||||||
|
|
||||||
|
### BannedAppUser
|
||||||
|
- __app_id__: _string_
|
||||||
|
- __user_identifier__: _string_
|
||||||
|
- __nostr_pub__: _string_
|
||||||
|
- __app_name__: _string_
|
||||||
|
|
||||||
|
### Application
|
||||||
|
- __name__: _string_
|
||||||
|
- __id__: _string_
|
||||||
|
- __balance__: _number_
|
||||||
|
- __npub__: _string_
|
||||||
|
|
||||||
|
### UsageMetric
|
||||||
|
- __processed_at_ms__: _number_
|
||||||
|
- __parsed_in_nano__: _number_
|
||||||
|
- __handle_in_nano__: _number_
|
||||||
|
- __rpc_name__: _string_
|
||||||
|
- __batch__: _boolean_
|
||||||
|
- __auth_in_nano__: _number_
|
||||||
|
- __validate_in_nano__: _number_
|
||||||
|
- __nostr__: _boolean_
|
||||||
|
- __batch_size__: _number_
|
||||||
|
|
||||||
|
### SetMockInvoiceAsPaidRequest
|
||||||
|
- __invoice__: _string_
|
||||||
|
- __amount__: _number_
|
||||||
|
|
||||||
|
### AuthAppRequest
|
||||||
|
- __name__: _string_
|
||||||
|
- __allow_user_creation__: _boolean_ *this field is optional
|
||||||
|
|
||||||
|
### AuthApp
|
||||||
|
- __app__: _[Application](#Application)_
|
||||||
|
- __auth_token__: _string_
|
||||||
|
|
||||||
|
### RelaysMigration
|
||||||
|
- __relays__: ARRAY of: _string_
|
||||||
|
|
||||||
|
### UsageMetrics
|
||||||
|
- __metrics__: ARRAY of: _[UsageMetric](#UsageMetric)_
|
||||||
|
|
||||||
|
### GraphPoint
|
||||||
|
- __y__: _number_
|
||||||
|
- __x__: _number_
|
||||||
|
|
||||||
|
### BanUserResponse
|
||||||
|
- __balance_sats__: _number_
|
||||||
|
- __banned_app_users__: ARRAY of: _[BannedAppUser](#BannedAppUser)_
|
||||||
|
|
||||||
|
### AddAppRequest
|
||||||
|
- __name__: _string_
|
||||||
|
- __allow_user_creation__: _boolean_
|
||||||
|
|
||||||
|
### PayAddressResponse
|
||||||
|
- __operation_id__: _string_
|
||||||
|
- __service_fee__: _number_
|
||||||
|
- __network_fee__: _number_
|
||||||
|
- __txId__: _string_
|
||||||
|
|
||||||
|
### UserInfo
|
||||||
|
- __balance__: _number_
|
||||||
|
- __max_withdrawable__: _number_
|
||||||
|
- __user_identifier__: _string_
|
||||||
|
- __service_fee_bps__: _number_
|
||||||
|
- __network_max_fee_bps__: _number_
|
||||||
|
- __network_max_fee_fixed__: _number_
|
||||||
|
- __userId__: _string_
|
||||||
|
|
||||||
|
### ClosureMigration
|
||||||
|
- __closes_at_unix__: _number_
|
||||||
|
|
||||||
|
### EnrollAdminTokenRequest
|
||||||
|
- __admin_token__: _string_
|
||||||
|
|
||||||
|
### EncryptionExchangeRequest
|
||||||
|
- __publicKey__: _string_
|
||||||
|
- __deviceId__: _string_
|
||||||
|
|
||||||
|
### GetInviteTokenStateRequest
|
||||||
|
- __invite_token__: _string_
|
||||||
|
|
||||||
|
### Empty
|
||||||
|
|
||||||
### LndSeed
|
### LndSeed
|
||||||
- __seed__: ARRAY of: _string_
|
- __seed__: ARRAY of: _string_
|
||||||
|
|
||||||
### LndChannels
|
### SendAppUserToAppPaymentRequest
|
||||||
- __open_channels__: ARRAY of: _[OpenChannel](#OpenChannel)_
|
- __from_user_identifier__: _string_
|
||||||
|
- __amount__: _number_
|
||||||
|
|
||||||
### OpenChannelRequest
|
### OpenChannelRequest
|
||||||
- __pushAmount__: _number_
|
- __pushAmount__: _number_
|
||||||
|
|
@ -856,162 +944,54 @@ The nostr server will send back a message response, and inside the body there wi
|
||||||
- __destination__: _string_
|
- __destination__: _string_
|
||||||
- __fundingAmount__: _number_
|
- __fundingAmount__: _number_
|
||||||
|
|
||||||
### UserOperations
|
|
||||||
- __fromIndex__: _number_
|
|
||||||
- __toIndex__: _number_
|
|
||||||
- __operations__: ARRAY of: _[UserOperation](#UserOperation)_
|
|
||||||
|
|
||||||
### Empty
|
|
||||||
|
|
||||||
### SendAppUserToAppUserPaymentRequest
|
|
||||||
- __from_user_identifier__: _string_
|
|
||||||
- __to_user_identifier__: _string_
|
|
||||||
- __amount__: _number_
|
|
||||||
|
|
||||||
### LnurlPayInfoResponse
|
### LnurlPayInfoResponse
|
||||||
- __maxSendable__: _number_
|
|
||||||
- __minSendable__: _number_
|
|
||||||
- __metadata__: _string_
|
|
||||||
- __allowsNostr__: _boolean_
|
- __allowsNostr__: _boolean_
|
||||||
- __nostrPubkey__: _string_
|
- __nostrPubkey__: _string_
|
||||||
- __tag__: _string_
|
- __tag__: _string_
|
||||||
- __callback__: _string_
|
- __callback__: _string_
|
||||||
|
- __maxSendable__: _number_
|
||||||
|
- __minSendable__: _number_
|
||||||
|
- __metadata__: _string_
|
||||||
|
|
||||||
### AddProductRequest
|
### AppsMetricsRequest
|
||||||
- __name__: _string_
|
- __to_unix__: _number_ *this field is optional
|
||||||
- __price_sats__: _number_
|
- __include_operations__: _boolean_ *this field is optional
|
||||||
|
- __from_unix__: _number_ *this field is optional
|
||||||
|
|
||||||
### RequestNPubLinkingTokenResponse
|
### LndNodeMetrics
|
||||||
- __token__: _string_
|
- __pending_channels__: _number_
|
||||||
|
- __open_channels__: ARRAY of: _[OpenChannel](#OpenChannel)_
|
||||||
|
- __closed_channels__: ARRAY of: _[ClosedChannel](#ClosedChannel)_
|
||||||
|
- __forwarding_fees__: _number_
|
||||||
|
- __channel_balance__: ARRAY of: _[GraphPoint](#GraphPoint)_
|
||||||
|
- __online_channels__: _number_
|
||||||
|
- __closing_channels__: _number_
|
||||||
|
- __forwarding_events__: _number_
|
||||||
|
- __chain_balance__: ARRAY of: _[GraphPoint](#GraphPoint)_
|
||||||
|
- __offline_channels__: _number_
|
||||||
|
|
||||||
### EnrollAdminTokenRequest
|
### LndGetInfoRequest
|
||||||
- __admin_token__: _string_
|
- __nodeId__: _number_
|
||||||
|
|
||||||
### CreateOneTimeInviteLinkRequest
|
### LiveUserOperation
|
||||||
- __sats__: _number_ *this field is optional
|
- __operation__: _[UserOperation](#UserOperation)_
|
||||||
|
|
||||||
### GetInviteTokenStateRequest
|
|
||||||
- __invite_token__: _string_
|
|
||||||
|
|
||||||
### RoutingEvent
|
|
||||||
- __forward_fail_event__: _boolean_
|
|
||||||
- __incoming_channel_id__: _number_
|
|
||||||
- __incoming_htlc_id__: _number_
|
|
||||||
- __event_type__: _string_
|
|
||||||
- __incoming_amt_msat__: _number_
|
|
||||||
- __failure_string__: _string_
|
|
||||||
- __settled__: _boolean_
|
|
||||||
- __offchain__: _boolean_
|
|
||||||
- __outgoing_channel_id__: _number_
|
|
||||||
- __outgoing_htlc_id__: _number_
|
|
||||||
- __timestamp_ns__: _number_
|
|
||||||
- __outgoing_amt_msat__: _number_
|
|
||||||
|
|
||||||
### GetAppUserRequest
|
### GetAppUserRequest
|
||||||
- __user_identifier__: _string_
|
- __user_identifier__: _string_
|
||||||
|
|
||||||
### PayInvoiceRequest
|
|
||||||
- __invoice__: _string_
|
|
||||||
- __amount__: _number_
|
|
||||||
|
|
||||||
### GetUserOperationsResponse
|
|
||||||
- __latestIncomingTxOperations__: _[UserOperations](#UserOperations)_
|
|
||||||
- __latestOutgoingUserToUserPayemnts__: _[UserOperations](#UserOperations)_
|
|
||||||
- __latestIncomingUserToUserPayemnts__: _[UserOperations](#UserOperations)_
|
|
||||||
- __latestOutgoingInvoiceOperations__: _[UserOperations](#UserOperations)_
|
|
||||||
- __latestIncomingInvoiceOperations__: _[UserOperations](#UserOperations)_
|
|
||||||
- __latestOutgoingTxOperations__: _[UserOperations](#UserOperations)_
|
|
||||||
|
|
||||||
### UsageMetrics
|
|
||||||
- __metrics__: ARRAY of: _[UsageMetric](#UsageMetric)_
|
|
||||||
|
|
||||||
### NewAddressRequest
|
|
||||||
- __addressType__: _[AddressType](#AddressType)_
|
|
||||||
|
|
||||||
### ClosedChannel
|
|
||||||
- __channel_id__: _string_
|
|
||||||
- __capacity__: _number_
|
|
||||||
- __closed_height__: _number_
|
|
||||||
|
|
||||||
### LndNodeMetrics
|
|
||||||
- __channels_balance_events__: ARRAY of: _[ChannelBalanceEvent](#ChannelBalanceEvent)_
|
|
||||||
- __chain_balance_events__: ARRAY of: _[ChainBalanceEvent](#ChainBalanceEvent)_
|
|
||||||
- __closed_channels__: ARRAY of: _[ClosedChannel](#ClosedChannel)_
|
|
||||||
- __channel_routing__: ARRAY of: _[ChannelRouting](#ChannelRouting)_
|
|
||||||
- __offline_channels__: _number_
|
|
||||||
- __online_channels__: _number_
|
|
||||||
- __pending_channels__: _number_
|
|
||||||
- __closing_channels__: _number_
|
|
||||||
- __open_channels__: ARRAY of: _[OpenChannel](#OpenChannel)_
|
|
||||||
|
|
||||||
### BanUserRequest
|
|
||||||
- __user_id__: _string_
|
|
||||||
|
|
||||||
### AddAppRequest
|
|
||||||
- __name__: _string_
|
|
||||||
- __allow_user_creation__: _boolean_
|
|
||||||
|
|
||||||
### AddAppUserInvoiceRequest
|
|
||||||
- __payer_identifier__: _string_
|
|
||||||
- __http_callback_url__: _string_
|
|
||||||
- __invoice_req__: _[NewInvoiceRequest](#NewInvoiceRequest)_
|
|
||||||
- __receiver_identifier__: _string_
|
|
||||||
|
|
||||||
### SetMockAppBalanceRequest
|
|
||||||
- __amount__: _number_
|
|
||||||
|
|
||||||
### AppMetrics
|
|
||||||
- __spent__: _number_
|
|
||||||
- __available__: _number_
|
|
||||||
- __fees__: _number_
|
|
||||||
- __invoices__: _number_
|
|
||||||
- __operations__: ARRAY of: _[UserOperation](#UserOperation)_
|
|
||||||
- __app__: _[Application](#Application)_
|
|
||||||
- __users__: _[UsersInfo](#UsersInfo)_
|
|
||||||
- __received__: _number_
|
|
||||||
- __total_fees__: _number_
|
|
||||||
|
|
||||||
### AppsMetrics
|
|
||||||
- __apps__: ARRAY of: _[AppMetrics](#AppMetrics)_
|
|
||||||
|
|
||||||
### ClosureMigration
|
|
||||||
- __closes_at_unix__: _number_
|
|
||||||
|
|
||||||
### PayAppUserInvoiceRequest
|
### PayAppUserInvoiceRequest
|
||||||
- __user_identifier__: _string_
|
- __user_identifier__: _string_
|
||||||
- __invoice__: _string_
|
- __invoice__: _string_
|
||||||
- __amount__: _number_
|
- __amount__: _number_
|
||||||
|
|
||||||
### NewAddressResponse
|
### LnurlLinkResponse
|
||||||
- __address__: _string_
|
- __lnurl__: _string_
|
||||||
|
- __k1__: _string_
|
||||||
|
|
||||||
### NewInvoiceResponse
|
### UserOperations
|
||||||
- __invoice__: _string_
|
- __fromIndex__: _number_
|
||||||
|
- __toIndex__: _number_
|
||||||
### UserOperation
|
- __operations__: ARRAY of: _[UserOperation](#UserOperation)_
|
||||||
- __identifier__: _string_
|
|
||||||
- __operationId__: _string_
|
|
||||||
- __network_fee__: _number_
|
|
||||||
- __confirmed__: _boolean_
|
|
||||||
- __tx_hash__: _string_
|
|
||||||
- __paidAtUnix__: _number_
|
|
||||||
- __type__: _[UserOperationType](#UserOperationType)_
|
|
||||||
- __amount__: _number_
|
|
||||||
- __internal__: _boolean_
|
|
||||||
- __inbound__: _boolean_
|
|
||||||
- __service_fee__: _number_
|
|
||||||
|
|
||||||
### UseInviteLinkRequest
|
|
||||||
- __invite_token__: _string_
|
|
||||||
|
|
||||||
### AuthApp
|
|
||||||
- __app__: _[Application](#Application)_
|
|
||||||
- __auth_token__: _string_
|
|
||||||
|
|
||||||
### AddAppInvoiceRequest
|
|
||||||
- __payer_identifier__: _string_
|
|
||||||
- __http_callback_url__: _string_
|
|
||||||
- __invoice_req__: _[NewInvoiceRequest](#NewInvoiceRequest)_
|
|
||||||
## Enums
|
## Enums
|
||||||
### The enumerators used in the messages
|
### The enumerators used in the messages
|
||||||
|
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -5,10 +5,10 @@ export type ResultError = { status: 'ERROR', reason: string }
|
||||||
|
|
||||||
export type NostrClientParams = {
|
export type NostrClientParams = {
|
||||||
pubDestination: string
|
pubDestination: string
|
||||||
retrieveNostrUserAuth: () => Promise<string | null>
|
|
||||||
retrieveNostrGuestWithPubAuth: () => Promise<string | null>
|
|
||||||
retrieveNostrAdminAuth: () => Promise<string | null>
|
retrieveNostrAdminAuth: () => Promise<string | null>
|
||||||
retrieveNostrMetricsAuth: () => Promise<string | null>
|
retrieveNostrMetricsAuth: () => Promise<string | null>
|
||||||
|
retrieveNostrUserAuth: () => Promise<string | null>
|
||||||
|
retrieveNostrGuestWithPubAuth: () => Promise<string | null>
|
||||||
checkResult?: true
|
checkResult?: true
|
||||||
}
|
}
|
||||||
export default (params: NostrClientParams, send: (to:string, message: NostrRequest) => Promise<any>, subscribe: (to:string, message: NostrRequest, cb:(res:any)=> void) => void) => ({
|
export default (params: NostrClientParams, send: (to:string, message: NostrRequest) => Promise<any>, subscribe: (to:string, message: NostrRequest, cb:(res:any)=> void) => void) => ({
|
||||||
|
|
|
||||||
|
|
@ -16,10 +16,10 @@ export type NostrOptions = {
|
||||||
logger?: Logger
|
logger?: Logger
|
||||||
throwErrors?: true
|
throwErrors?: true
|
||||||
metricsCallback: (metrics: Types.RequestMetric[]) => void
|
metricsCallback: (metrics: Types.RequestMetric[]) => void
|
||||||
NostrUserAuthGuard: (appId?:string, identifier?: string) => Promise<Types.UserContext>
|
|
||||||
NostrGuestWithPubAuthGuard: (appId?:string, identifier?: string) => Promise<Types.GuestWithPubContext>
|
|
||||||
NostrAdminAuthGuard: (appId?:string, identifier?: string) => Promise<Types.AdminContext>
|
NostrAdminAuthGuard: (appId?:string, identifier?: string) => Promise<Types.AdminContext>
|
||||||
NostrMetricsAuthGuard: (appId?:string, identifier?: string) => Promise<Types.MetricsContext>
|
NostrMetricsAuthGuard: (appId?:string, identifier?: string) => Promise<Types.MetricsContext>
|
||||||
|
NostrUserAuthGuard: (appId?:string, identifier?: string) => Promise<Types.UserContext>
|
||||||
|
NostrGuestWithPubAuthGuard: (appId?:string, identifier?: string) => Promise<Types.GuestWithPubContext>
|
||||||
}
|
}
|
||||||
const logErrorAndReturnResponse = (error: Error, response: string, res: NostrResponse, logger: Logger, metric: Types.RequestMetric, metricsCallback: (metrics: Types.RequestMetric[]) => void) => {
|
const logErrorAndReturnResponse = (error: Error, response: string, res: NostrResponse, logger: Logger, metric: Types.RequestMetric, metricsCallback: (metrics: Types.RequestMetric[]) => void) => {
|
||||||
logger.error(error.message || error); metricsCallback([{ ...metric, error: response }]); res({ status: 'ERROR', reason: response })
|
logger.error(error.message || error); metricsCallback([{ ...metric, error: response }]); res({ status: 'ERROR', reason: response })
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue