3 KiB
3 KiB
NOSTR API DEFINITION
A nostr request will take the same parameter and give the same response as an http request, but it will use nostr as transport, to do that it will send encrypted events to the server public key, in the event 6 thing are required:
- rpcName: string containing the name of the method
- params: a map with the all the url params for the method
- query: a map with the the url query for the method
- body: the body of the method request
- requestId: id of the request to be able to get a response
The nostr server will send back a message response, and inside the body there will also be a requestId to identify the request this response is answering
NOSTR Methods
These are the nostr methods the client implements to communicate with the API via nostr
HTTP API DEFINITION
Supported HTTP Auths
These are the supported http auth types, to give different type of access to the API users
- Guest:
- expected context content
HTTP Methods
These are the http methods the client implements to communicate with the API
-
GetAdminConnectInfo
- auth type: Guest
- http method: get
- http route: /wizard/admin_connect_info
- This methods has an empty request body
- output: AdminConnectInfoResponse
-
GetServiceState
- auth type: Guest
- http method: get
- http route: /wizard/service_state
- This methods has an empty request body
- output: ServiceStateResponse
-
WizardConfig
- auth type: Guest
- http method: post
- http route: /wizard/config
- input: ConfigRequest
- This methods has an empty response body
-
WizardState
- auth type: Guest
- http method: get
- http route: /wizard/state
- This methods has an empty request body
- output: StateResponse
INPUTS AND OUTPUTS
Messages
The content of requests and response from the methods
AdminConnectInfoResponse
- connect_info: AdminConnectInfoResponse_connect_info
- nprofile: string
ConfigRequest
- automate_liquidity: boolean
- avatar_url: string
- push_backups_to_nostr: boolean
- relay_url: string
- source_name: string
Empty
ServiceStateResponse
- admin_npub: string
- app_id: string
- automate_liquidity: boolean
- avatar_url: string
- http_url: string
- lnd_state: LndState
- nprofile: string
- provider_name: string
- push_backups_to_nostr: boolean
- relay_connected: boolean
- relay_url: string
- relays: ARRAY of: string
- source_name: string
- watchdog_ok: boolean
StateResponse
- admin_linked: boolean
- config_sent: boolean
Enums
The enumerators used in the messages
LndState
- OFFLINE
- ONLINE
- SYNCING