authorization hook, and spec changes
This commit is contained in:
parent
6df5752d46
commit
49b8dd693c
19 changed files with 2655 additions and 216 deletions
1551
proto/autogenerated/go/http_client.go
Normal file
1551
proto/autogenerated/go/http_client.go
Normal file
File diff suppressed because it is too large
Load diff
515
proto/autogenerated/go/types.go
Normal file
515
proto/autogenerated/go/types.go
Normal file
|
|
@ -0,0 +1,515 @@
|
|||
// This file was autogenerated from a .proto file, DO NOT EDIT!
|
||||
|
||||
package lightning_pub
|
||||
|
||||
type ResultError struct {
|
||||
Status string `json:"status"`
|
||||
Reason string `json:"reason"`
|
||||
}
|
||||
type AdminContext struct {
|
||||
Admin_id string `json:"admin_id"`
|
||||
}
|
||||
type AppContext struct {
|
||||
App_id string `json:"app_id"`
|
||||
}
|
||||
type GuestContext struct {
|
||||
}
|
||||
type GuestWithPubContext struct {
|
||||
App_id string `json:"app_id"`
|
||||
Pub string `json:"pub"`
|
||||
}
|
||||
type MetricsContext struct {
|
||||
Operator_id string `json:"operator_id"`
|
||||
}
|
||||
type UserContext struct {
|
||||
App_id string `json:"app_id"`
|
||||
App_user_id string `json:"app_user_id"`
|
||||
User_id string `json:"user_id"`
|
||||
}
|
||||
type GetLnurlPayInfo_Query struct {
|
||||
K1 *string `json:"k1,omitempty"`
|
||||
}
|
||||
type GetLnurlWithdrawInfo_Query struct {
|
||||
K1 *string `json:"k1,omitempty"`
|
||||
}
|
||||
type HandleLnurlAddress_RouteParams struct {
|
||||
Address_name string `json:"address_name"`
|
||||
}
|
||||
type HandleLnurlPay_Query struct {
|
||||
Amount *string `json:"amount,omitempty"`
|
||||
K1 *string `json:"k1,omitempty"`
|
||||
Lnurl *string `json:"lnurl,omitempty"`
|
||||
Nostr *string `json:"nostr,omitempty"`
|
||||
}
|
||||
type HandleLnurlWithdraw_Query struct {
|
||||
K1 *string `json:"k1,omitempty"`
|
||||
Pr *string `json:"pr,omitempty"`
|
||||
}
|
||||
type NewProductInvoice_Query struct {
|
||||
Id *string `json:"id,omitempty"`
|
||||
}
|
||||
type AddressType string
|
||||
|
||||
const (
|
||||
NESTED_PUBKEY_HASH AddressType = "NESTED_PUBKEY_HASH"
|
||||
TAPROOT_PUBKEY AddressType = "TAPROOT_PUBKEY"
|
||||
WITNESS_PUBKEY_HASH AddressType = "WITNESS_PUBKEY_HASH"
|
||||
)
|
||||
|
||||
type IntervalType string
|
||||
|
||||
const (
|
||||
DAY IntervalType = "DAY"
|
||||
MONTH IntervalType = "MONTH"
|
||||
WEEK IntervalType = "WEEK"
|
||||
)
|
||||
|
||||
type UserOperationType string
|
||||
|
||||
const (
|
||||
INCOMING_INVOICE UserOperationType = "INCOMING_INVOICE"
|
||||
INCOMING_TX UserOperationType = "INCOMING_TX"
|
||||
INCOMING_USER_TO_USER UserOperationType = "INCOMING_USER_TO_USER"
|
||||
OUTGOING_INVOICE UserOperationType = "OUTGOING_INVOICE"
|
||||
OUTGOING_TX UserOperationType = "OUTGOING_TX"
|
||||
OUTGOING_USER_TO_USER UserOperationType = "OUTGOING_USER_TO_USER"
|
||||
)
|
||||
|
||||
type AddAppInvoiceRequest struct {
|
||||
Http_callback_url string `json:"http_callback_url"`
|
||||
Invoice_req *NewInvoiceRequest `json:"invoice_req"`
|
||||
Payer_identifier string `json:"payer_identifier"`
|
||||
}
|
||||
type AddAppRequest struct {
|
||||
Allow_user_creation bool `json:"allow_user_creation"`
|
||||
Name string `json:"name"`
|
||||
}
|
||||
type AddAppUserInvoiceRequest struct {
|
||||
Http_callback_url string `json:"http_callback_url"`
|
||||
Invoice_req *NewInvoiceRequest `json:"invoice_req"`
|
||||
Payer_identifier string `json:"payer_identifier"`
|
||||
Receiver_identifier string `json:"receiver_identifier"`
|
||||
}
|
||||
type AddAppUserRequest struct {
|
||||
Balance int64 `json:"balance"`
|
||||
Fail_if_exists bool `json:"fail_if_exists"`
|
||||
Identifier string `json:"identifier"`
|
||||
}
|
||||
type AddProductRequest struct {
|
||||
Name string `json:"name"`
|
||||
Price_sats int64 `json:"price_sats"`
|
||||
}
|
||||
type AppMetrics struct {
|
||||
App *Application `json:"app"`
|
||||
Available int64 `json:"available"`
|
||||
Fees int64 `json:"fees"`
|
||||
Invoices int64 `json:"invoices"`
|
||||
Operations []UserOperation `json:"operations"`
|
||||
Received int64 `json:"received"`
|
||||
Spent int64 `json:"spent"`
|
||||
Total_fees int64 `json:"total_fees"`
|
||||
Users *UsersInfo `json:"users"`
|
||||
}
|
||||
type AppUser struct {
|
||||
Identifier string `json:"identifier"`
|
||||
Info *UserInfo `json:"info"`
|
||||
Max_withdrawable int64 `json:"max_withdrawable"`
|
||||
}
|
||||
type Application struct {
|
||||
Balance int64 `json:"balance"`
|
||||
Id string `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Npub string `json:"npub"`
|
||||
}
|
||||
type AppsMetrics struct {
|
||||
Apps []AppMetrics `json:"apps"`
|
||||
}
|
||||
type AppsMetricsRequest struct {
|
||||
From_unix int64 `json:"from_unix"`
|
||||
Include_operations bool `json:"include_operations"`
|
||||
To_unix int64 `json:"to_unix"`
|
||||
}
|
||||
type AuthApp struct {
|
||||
App *Application `json:"app"`
|
||||
Auth_token string `json:"auth_token"`
|
||||
}
|
||||
type AuthAppRequest struct {
|
||||
Allow_user_creation bool `json:"allow_user_creation"`
|
||||
Name string `json:"name"`
|
||||
}
|
||||
type BanUserRequest struct {
|
||||
User_id string `json:"user_id"`
|
||||
}
|
||||
type BanUserResponse struct {
|
||||
Balance_sats int64 `json:"balance_sats"`
|
||||
Banned_app_users []BannedAppUser `json:"banned_app_users"`
|
||||
}
|
||||
type BannedAppUser struct {
|
||||
App_id string `json:"app_id"`
|
||||
App_name string `json:"app_name"`
|
||||
Nostr_pub string `json:"nostr_pub"`
|
||||
User_identifier string `json:"user_identifier"`
|
||||
}
|
||||
type ClosedChannel struct {
|
||||
Capacity int64 `json:"capacity"`
|
||||
Channel_id string `json:"channel_id"`
|
||||
Closed_height int64 `json:"closed_height"`
|
||||
}
|
||||
type ClosureMigration struct {
|
||||
Closes_at_unix int64 `json:"closes_at_unix"`
|
||||
}
|
||||
type CreateOneTimeInviteLinkRequest struct {
|
||||
Sats int64 `json:"sats"`
|
||||
}
|
||||
type CreateOneTimeInviteLinkResponse struct {
|
||||
Invitation_link string `json:"invitation_link"`
|
||||
}
|
||||
type DebitAuthorization struct {
|
||||
Authorized bool `json:"authorized"`
|
||||
Debit_id string `json:"debit_id"`
|
||||
Npub string `json:"npub"`
|
||||
Rules []DebitRule `json:"rules"`
|
||||
}
|
||||
type DebitAuthorizationRequest struct {
|
||||
Authorize_npub string `json:"authorize_npub"`
|
||||
Rules []DebitRule `json:"rules"`
|
||||
}
|
||||
type DebitAuthorizations struct {
|
||||
Debits []DebitAuthorization `json:"debits"`
|
||||
}
|
||||
type DebitExpirationRule struct {
|
||||
Expires_at_unix int64 `json:"expires_at_unix"`
|
||||
}
|
||||
type DebitRule struct {
|
||||
Rule *DebitRule_rule `json:"rule"`
|
||||
}
|
||||
type DecodeInvoiceRequest struct {
|
||||
Invoice string `json:"invoice"`
|
||||
}
|
||||
type DecodeInvoiceResponse struct {
|
||||
Amount int64 `json:"amount"`
|
||||
}
|
||||
type Empty struct {
|
||||
}
|
||||
type EncryptionExchangeRequest struct {
|
||||
Deviceid string `json:"deviceId"`
|
||||
Publickey string `json:"publicKey"`
|
||||
}
|
||||
type EnrollAdminTokenRequest struct {
|
||||
Admin_token string `json:"admin_token"`
|
||||
}
|
||||
type FrequencyRule struct {
|
||||
Interval IntervalType `json:"interval"`
|
||||
Number_of_intervals int64 `json:"number_of_intervals"`
|
||||
}
|
||||
type GetAppUserLNURLInfoRequest struct {
|
||||
Base_url_override string `json:"base_url_override"`
|
||||
User_identifier string `json:"user_identifier"`
|
||||
}
|
||||
type GetAppUserRequest struct {
|
||||
User_identifier string `json:"user_identifier"`
|
||||
}
|
||||
type GetInviteTokenStateRequest struct {
|
||||
Invite_token string `json:"invite_token"`
|
||||
}
|
||||
type GetInviteTokenStateResponse struct {
|
||||
Used bool `json:"used"`
|
||||
}
|
||||
type GetPaymentStateRequest struct {
|
||||
Invoice string `json:"invoice"`
|
||||
}
|
||||
type GetProductBuyLinkResponse struct {
|
||||
Link string `json:"link"`
|
||||
}
|
||||
type GetUserOperationsRequest struct {
|
||||
Latestincominginvoice int64 `json:"latestIncomingInvoice"`
|
||||
Latestincomingtx int64 `json:"latestIncomingTx"`
|
||||
Latestincomingusertouserpayment int64 `json:"latestIncomingUserToUserPayment"`
|
||||
Latestoutgoinginvoice int64 `json:"latestOutgoingInvoice"`
|
||||
Latestoutgoingtx int64 `json:"latestOutgoingTx"`
|
||||
Latestoutgoingusertouserpayment int64 `json:"latestOutgoingUserToUserPayment"`
|
||||
Max_size int64 `json:"max_size"`
|
||||
}
|
||||
type GetUserOperationsResponse struct {
|
||||
Latestincominginvoiceoperations *UserOperations `json:"latestIncomingInvoiceOperations"`
|
||||
Latestincomingtxoperations *UserOperations `json:"latestIncomingTxOperations"`
|
||||
Latestincomingusertouserpayemnts *UserOperations `json:"latestIncomingUserToUserPayemnts"`
|
||||
Latestoutgoinginvoiceoperations *UserOperations `json:"latestOutgoingInvoiceOperations"`
|
||||
Latestoutgoingtxoperations *UserOperations `json:"latestOutgoingTxOperations"`
|
||||
Latestoutgoingusertouserpayemnts *UserOperations `json:"latestOutgoingUserToUserPayemnts"`
|
||||
}
|
||||
type GraphPoint struct {
|
||||
X int64 `json:"x"`
|
||||
Y int64 `json:"y"`
|
||||
}
|
||||
type HandleLnurlPayResponse struct {
|
||||
Pr string `json:"pr"`
|
||||
Routes []Empty `json:"routes"`
|
||||
}
|
||||
type HttpCreds struct {
|
||||
Token string `json:"token"`
|
||||
Url string `json:"url"`
|
||||
}
|
||||
type LinkNPubThroughTokenRequest struct {
|
||||
Token string `json:"token"`
|
||||
}
|
||||
type LiveDebitRequest struct {
|
||||
Amount int64 `json:"amount"`
|
||||
Debit *LiveDebitRequest_debit `json:"debit"`
|
||||
Npub string `json:"npub"`
|
||||
}
|
||||
type LiveUserOperation struct {
|
||||
Operation *UserOperation `json:"operation"`
|
||||
}
|
||||
type LndChannels struct {
|
||||
Open_channels []OpenChannel `json:"open_channels"`
|
||||
}
|
||||
type LndGetInfoRequest struct {
|
||||
Nodeid int64 `json:"nodeId"`
|
||||
}
|
||||
type LndGetInfoResponse struct {
|
||||
Alias string `json:"alias"`
|
||||
}
|
||||
type LndMetrics struct {
|
||||
Nodes []LndNodeMetrics `json:"nodes"`
|
||||
}
|
||||
type LndMetricsRequest struct {
|
||||
From_unix int64 `json:"from_unix"`
|
||||
To_unix int64 `json:"to_unix"`
|
||||
}
|
||||
type LndNodeMetrics struct {
|
||||
Chain_balance []GraphPoint `json:"chain_balance"`
|
||||
Channel_balance []GraphPoint `json:"channel_balance"`
|
||||
Closed_channels []ClosedChannel `json:"closed_channels"`
|
||||
Closing_channels int64 `json:"closing_channels"`
|
||||
External_balance []GraphPoint `json:"external_balance"`
|
||||
Forwarding_events int64 `json:"forwarding_events"`
|
||||
Forwarding_fees int64 `json:"forwarding_fees"`
|
||||
Offline_channels int64 `json:"offline_channels"`
|
||||
Online_channels int64 `json:"online_channels"`
|
||||
Open_channels []OpenChannel `json:"open_channels"`
|
||||
Pending_channels int64 `json:"pending_channels"`
|
||||
}
|
||||
type LndSeed struct {
|
||||
Seed []string `json:"seed"`
|
||||
}
|
||||
type LnurlLinkResponse struct {
|
||||
K1 string `json:"k1"`
|
||||
Lnurl string `json:"lnurl"`
|
||||
}
|
||||
type LnurlPayInfoResponse struct {
|
||||
Allowsnostr bool `json:"allowsNostr"`
|
||||
Callback string `json:"callback"`
|
||||
Maxsendable int64 `json:"maxSendable"`
|
||||
Metadata string `json:"metadata"`
|
||||
Minsendable int64 `json:"minSendable"`
|
||||
Nostrpubkey string `json:"nostrPubkey"`
|
||||
Tag string `json:"tag"`
|
||||
}
|
||||
type LnurlWithdrawInfoResponse struct {
|
||||
Balancecheck string `json:"balanceCheck"`
|
||||
Callback string `json:"callback"`
|
||||
Defaultdescription string `json:"defaultDescription"`
|
||||
K1 string `json:"k1"`
|
||||
Maxwithdrawable int64 `json:"maxWithdrawable"`
|
||||
Minwithdrawable int64 `json:"minWithdrawable"`
|
||||
Paylink string `json:"payLink"`
|
||||
Tag string `json:"tag"`
|
||||
}
|
||||
type MigrationUpdate struct {
|
||||
Closure *ClosureMigration `json:"closure"`
|
||||
Relays *RelaysMigration `json:"relays"`
|
||||
}
|
||||
type NewAddressRequest struct {
|
||||
Addresstype AddressType `json:"addressType"`
|
||||
}
|
||||
type NewAddressResponse struct {
|
||||
Address string `json:"address"`
|
||||
}
|
||||
type NewInvoiceRequest struct {
|
||||
Amountsats int64 `json:"amountSats"`
|
||||
Memo string `json:"memo"`
|
||||
}
|
||||
type NewInvoiceResponse struct {
|
||||
Invoice string `json:"invoice"`
|
||||
}
|
||||
type OpenChannel struct {
|
||||
Active bool `json:"active"`
|
||||
Capacity int64 `json:"capacity"`
|
||||
Channel_id string `json:"channel_id"`
|
||||
Label string `json:"label"`
|
||||
Lifetime int64 `json:"lifetime"`
|
||||
Local_balance int64 `json:"local_balance"`
|
||||
Remote_balance int64 `json:"remote_balance"`
|
||||
}
|
||||
type OpenChannelRequest struct {
|
||||
Closeaddress string `json:"closeAddress"`
|
||||
Destination string `json:"destination"`
|
||||
Fundingamount int64 `json:"fundingAmount"`
|
||||
Pushamount int64 `json:"pushAmount"`
|
||||
}
|
||||
type OpenChannelResponse struct {
|
||||
Channelid string `json:"channelId"`
|
||||
}
|
||||
type PayAddressRequest struct {
|
||||
Address string `json:"address"`
|
||||
Amoutsats int64 `json:"amoutSats"`
|
||||
Satspervbyte int64 `json:"satsPerVByte"`
|
||||
}
|
||||
type PayAddressResponse struct {
|
||||
Network_fee int64 `json:"network_fee"`
|
||||
Operation_id string `json:"operation_id"`
|
||||
Service_fee int64 `json:"service_fee"`
|
||||
Txid string `json:"txId"`
|
||||
}
|
||||
type PayAppUserInvoiceRequest struct {
|
||||
Amount int64 `json:"amount"`
|
||||
Invoice string `json:"invoice"`
|
||||
User_identifier string `json:"user_identifier"`
|
||||
}
|
||||
type PayInvoiceRequest struct {
|
||||
Amount int64 `json:"amount"`
|
||||
Invoice string `json:"invoice"`
|
||||
}
|
||||
type PayInvoiceResponse struct {
|
||||
Amount_paid int64 `json:"amount_paid"`
|
||||
Network_fee int64 `json:"network_fee"`
|
||||
Operation_id string `json:"operation_id"`
|
||||
Preimage string `json:"preimage"`
|
||||
Service_fee int64 `json:"service_fee"`
|
||||
}
|
||||
type PaymentState struct {
|
||||
Amount int64 `json:"amount"`
|
||||
Network_fee int64 `json:"network_fee"`
|
||||
Paid_at_unix int64 `json:"paid_at_unix"`
|
||||
Service_fee int64 `json:"service_fee"`
|
||||
}
|
||||
type Product struct {
|
||||
Id string `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Noffer string `json:"noffer"`
|
||||
Price_sats int64 `json:"price_sats"`
|
||||
}
|
||||
type RelaysMigration struct {
|
||||
Relays []string `json:"relays"`
|
||||
}
|
||||
type RemoveAuthorizedDebitRequest struct {
|
||||
Npub string `json:"npub"`
|
||||
}
|
||||
type RequestNPubLinkingTokenRequest struct {
|
||||
User_identifier string `json:"user_identifier"`
|
||||
}
|
||||
type RequestNPubLinkingTokenResponse struct {
|
||||
Token string `json:"token"`
|
||||
}
|
||||
type RoutingEvent struct {
|
||||
Event_type string `json:"event_type"`
|
||||
Failure_string string `json:"failure_string"`
|
||||
Forward_fail_event bool `json:"forward_fail_event"`
|
||||
Incoming_amt_msat int64 `json:"incoming_amt_msat"`
|
||||
Incoming_channel_id int64 `json:"incoming_channel_id"`
|
||||
Incoming_htlc_id int64 `json:"incoming_htlc_id"`
|
||||
Offchain bool `json:"offchain"`
|
||||
Outgoing_amt_msat int64 `json:"outgoing_amt_msat"`
|
||||
Outgoing_channel_id int64 `json:"outgoing_channel_id"`
|
||||
Outgoing_htlc_id int64 `json:"outgoing_htlc_id"`
|
||||
Settled bool `json:"settled"`
|
||||
Timestamp_ns int64 `json:"timestamp_ns"`
|
||||
}
|
||||
type SendAppUserToAppPaymentRequest struct {
|
||||
Amount int64 `json:"amount"`
|
||||
From_user_identifier string `json:"from_user_identifier"`
|
||||
}
|
||||
type SendAppUserToAppUserPaymentRequest struct {
|
||||
Amount int64 `json:"amount"`
|
||||
From_user_identifier string `json:"from_user_identifier"`
|
||||
To_user_identifier string `json:"to_user_identifier"`
|
||||
}
|
||||
type SetMockAppBalanceRequest struct {
|
||||
Amount int64 `json:"amount"`
|
||||
}
|
||||
type SetMockAppUserBalanceRequest struct {
|
||||
Amount int64 `json:"amount"`
|
||||
User_identifier string `json:"user_identifier"`
|
||||
}
|
||||
type SetMockInvoiceAsPaidRequest struct {
|
||||
Amount int64 `json:"amount"`
|
||||
Invoice string `json:"invoice"`
|
||||
}
|
||||
type UsageMetric struct {
|
||||
Auth_in_nano int64 `json:"auth_in_nano"`
|
||||
Batch bool `json:"batch"`
|
||||
Batch_size int64 `json:"batch_size"`
|
||||
Handle_in_nano int64 `json:"handle_in_nano"`
|
||||
Nostr bool `json:"nostr"`
|
||||
Parsed_in_nano int64 `json:"parsed_in_nano"`
|
||||
Processed_at_ms int64 `json:"processed_at_ms"`
|
||||
Rpc_name string `json:"rpc_name"`
|
||||
Validate_in_nano int64 `json:"validate_in_nano"`
|
||||
}
|
||||
type UsageMetrics struct {
|
||||
Metrics []UsageMetric `json:"metrics"`
|
||||
}
|
||||
type UseInviteLinkRequest struct {
|
||||
Invite_token string `json:"invite_token"`
|
||||
}
|
||||
type UserInfo struct {
|
||||
Balance int64 `json:"balance"`
|
||||
Max_withdrawable int64 `json:"max_withdrawable"`
|
||||
Network_max_fee_bps int64 `json:"network_max_fee_bps"`
|
||||
Network_max_fee_fixed int64 `json:"network_max_fee_fixed"`
|
||||
Noffer string `json:"noffer"`
|
||||
Service_fee_bps int64 `json:"service_fee_bps"`
|
||||
Userid string `json:"userId"`
|
||||
User_identifier string `json:"user_identifier"`
|
||||
}
|
||||
type UserOperation struct {
|
||||
Amount int64 `json:"amount"`
|
||||
Confirmed bool `json:"confirmed"`
|
||||
Identifier string `json:"identifier"`
|
||||
Inbound bool `json:"inbound"`
|
||||
Internal bool `json:"internal"`
|
||||
Network_fee int64 `json:"network_fee"`
|
||||
Operationid string `json:"operationId"`
|
||||
Paidatunix int64 `json:"paidAtUnix"`
|
||||
Service_fee int64 `json:"service_fee"`
|
||||
Tx_hash string `json:"tx_hash"`
|
||||
Type UserOperationType `json:"type"`
|
||||
}
|
||||
type UserOperations struct {
|
||||
Fromindex int64 `json:"fromIndex"`
|
||||
Operations []UserOperation `json:"operations"`
|
||||
Toindex int64 `json:"toIndex"`
|
||||
}
|
||||
type UsersInfo struct {
|
||||
Always_been_inactive int64 `json:"always_been_inactive"`
|
||||
Balance_avg int64 `json:"balance_avg"`
|
||||
Balance_median int64 `json:"balance_median"`
|
||||
Negative_balance int64 `json:"negative_balance"`
|
||||
No_balance int64 `json:"no_balance"`
|
||||
Total int64 `json:"total"`
|
||||
}
|
||||
type DebitRule_rule_type string
|
||||
|
||||
const (
|
||||
EXPIRATION_RULE DebitRule_rule_type = "expiration_rule"
|
||||
FREQUENCY_RULE DebitRule_rule_type = "frequency_rule"
|
||||
)
|
||||
|
||||
type DebitRule_rule struct {
|
||||
Type DebitRule_rule_type `json:"type"`
|
||||
Expiration_rule *DebitExpirationRule `json:"expiration_rule"`
|
||||
Frequency_rule *FrequencyRule `json:"frequency_rule"`
|
||||
}
|
||||
type LiveDebitRequest_debit_type string
|
||||
|
||||
const (
|
||||
FREQUENCY LiveDebitRequest_debit_type = "frequency"
|
||||
INVOICE LiveDebitRequest_debit_type = "invoice"
|
||||
)
|
||||
|
||||
type LiveDebitRequest_debit struct {
|
||||
Type LiveDebitRequest_debit_type `json:"type"`
|
||||
Frequency *FrequencyRule `json:"frequency"`
|
||||
Invoice *string `json:"invoice"`
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue