Skip to main content

PublicGatewayApi

Trait PublicGatewayApi 

Source
pub trait PublicGatewayApi {
    // Required methods
    async fn get_lnurl_pay_request(
        &self,
    ) -> Result<LnurlPayRequestWire, LnurlError>;
    async fn lnurl_callback(
        &self,
        req: LnurlCallbackRequest,
    ) -> Result<LnurlCallbackResponse, LnurlError>;
}
Expand description

Defines the api that the gateway exposes to the internet.

Required Methods§

Source

async fn get_lnurl_pay_request(&self) -> Result<LnurlPayRequestWire, LnurlError>

Get the LNURL pay request message, if any username has been set. Uses lnurl_callback endpoint as the callback.

GET /.well-known/lnurlp/{username}

Source

async fn lnurl_callback( &self, req: LnurlCallbackRequest, ) -> Result<LnurlCallbackResponse, LnurlError>

Resolves the invoice given a LNURL pay request previously generated. Ciphertext is a base64 encoded string of the username and other metadata information.

GET /public/v1/lnurl_callback/{encoded_params}

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§