Documentation ¶
Index ¶
- type Balance
- type BitcoinInvoiceIsPaid
- type ConvertLnUrlInvoiceToLNDRequest
- type ConvertLnUrlInvoiceToLNDResponse
- type CreateInvoiceRequest
- type CreateLightningInvoiceResponse
- type EstimateOnChainTxRequest
- type EstimateOnChainTxResponse
- type Event
- type EventType
- type FilteredLightningInvoice
- type FilteredLightningTransaction
- type FilteredOnChainInvoice
- type FilteredOnChainTransaction
- type GetLightningAddrForMerchantRequest
- type GetLightningAddrForMerchantResponse
- type GetLightningAddrResponse
- type GetLightningInvoiceRequest
- type GetLightningInvoiceResponse
- type GetLightningTransactionRequest
- type GetLightningTransactionResponse
- type GetOnChainInvoiceRequest
- type GetOnChainInvoiceResponse
- type GetOnChainTransactionRequest
- type GetOnChainTransactionResponse
- type GetStatisticRequest
- type GetStatisticResponse
- type Interface
- type InvoiceStatus
- type LightningInvoiceIsPaid
- type SendLightningPaymentRequest
- type SendOnChainPaymentRequest
- type Timestamp
- type TransactionStatus
- type TransactionType
- type VerifyWebhookSignatureRequest
- type VerifyWebhookSignatureResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BitcoinInvoiceIsPaid ¶
type BitcoinInvoiceIsPaid struct {
BitcoinAddress string `json:"bitcoin_address"`
}
type ConvertLnUrlInvoiceToLNDResponse ¶
type ConvertLnUrlInvoiceToLNDResponse struct {
Invoice string `json:"invoice"`
}
type CreateInvoiceRequest ¶
type EstimateOnChainTxResponse ¶
type EstimateOnChainTxResponse struct {
Fee int64 `json:"amount"`
}
type Event ¶
type Event struct { EventType EventType `json:"event_type"` LightningInvoiceIsPaid *LightningInvoiceIsPaid `json:"lightning_invoice_is_paid,omitempty"` BitcoinInvoiceIsPaid *BitcoinInvoiceIsPaid `json:"bitcoin_invoice_is_paid,omitempty"` }
type FilteredLightningTransaction ¶
type FilteredLightningTransaction struct { ID string `json:"id"` MerchantID string `json:"merchant_id"` Status TransactionStatus `json:"status"` Source string `json:"source"` Destination string `json:"destination"` Amount int64 `json:"amount"` CreatedAt *Timestamp `json:"created_at"` Direction TransactionType `json:"direction"` ExplorerUrl string `json:"explorer_url"` }
type FilteredOnChainInvoice ¶
type FilteredOnChainInvoice struct { BitcoinAddress string `json:"bitcoin_address"` Description string `json:"description"` Amount int64 `json:"amount"` Status InvoiceStatus `json:"status"` CreatedAt *Timestamp `json:"created_at"` }
type FilteredOnChainTransaction ¶
type FilteredOnChainTransaction struct { ID string `json:"id"` MerchantID string `json:"merchant_id"` Status TransactionStatus `json:"status"` Source string `json:"source"` Destination string `json:"destination"` Amount int64 `json:"amount"` CreatedAt *Timestamp `json:"created_at"` Direction TransactionType `json:"direction"` Confirmations int32 `json:"confirmations"` BlockNumber int64 `json:"block_number"` ExplorerUrl string `json:"explorer_url"` }
type GetLightningAddrForMerchantResponse ¶
type GetLightningAddrForMerchantResponse struct {
Invoice string `json:"invoice"`
}
type GetLightningAddrResponse ¶
type GetLightningAddrResponse struct {
Invoice string `json:"invoice"`
}
type GetLightningInvoiceResponse ¶
type GetLightningInvoiceResponse struct {
Invoice *FilteredLightningInvoice `json:"invoice"`
}
type GetLightningTransactionResponse ¶
type GetLightningTransactionResponse struct {
Transaction *FilteredLightningTransaction `json:"transaction"`
}
type GetOnChainInvoiceResponse ¶
type GetOnChainInvoiceResponse struct {
Invoice *FilteredOnChainInvoice `json:"invoice"`
}
type GetOnChainTransactionResponse ¶
type GetOnChainTransactionResponse struct {
Transaction *FilteredOnChainTransaction `json:"transaction"`
}
type GetStatisticRequest ¶
type GetStatisticResponse ¶
type GetStatisticResponse struct {
Statistic string `json:"statistic"`
}
type Interface ¶
type Interface interface { GetBalance(nonce string) (*Balance, error) GetSignature(url string, nonce string, body []byte) (string, error) EstimateOnChainTx(req *EstimateOnChainTxRequest) (*EstimateOnChainTxResponse, error) GetLightningAddress(nonce string) (*GetLightningAddrResponse, error) GetLightningAddressForMerchant(req *GetLightningAddrForMerchantRequest) (*GetLightningAddrForMerchantResponse, error) ConvertLnUrlInvoiceToLND(req *ConvertLnUrlInvoiceToLNDRequest) (*ConvertLnUrlInvoiceToLNDResponse, error) CreateOnChainInvoice(*CreateInvoiceRequest) (string, error) CreateLightningInvoice(*CreateInvoiceRequest) (*CreateLightningInvoiceResponse, error) SendOnChainPayment(*SendOnChainPaymentRequest) error SendLightningPayment(*SendLightningPaymentRequest) error GetOnChainInvoice(*GetOnChainInvoiceRequest) (*GetOnChainInvoiceResponse, error) GetLightningInvoice(*GetLightningInvoiceRequest) (*GetLightningInvoiceResponse, error) GetOnChainTransaction(*GetOnChainTransactionRequest) (*GetOnChainTransactionResponse, error) GetLightningTransaction(*GetLightningTransactionRequest) (*GetLightningTransactionResponse, error) VerifyWebhookSignature(*VerifyWebhookSignatureRequest) (*VerifyWebhookSignatureResponse, error) GetStatistic(*GetStatisticRequest) (*GetStatisticResponse, error) }
type InvoiceStatus ¶
type InvoiceStatus int32
const ( InvoiceStatus_INVOICE_STATUS_UNSPECIFIED InvoiceStatus = 0 InvoiceStatus_INVOICE_STATUS_PAID InvoiceStatus = 1 InvoiceStatus_INVOICE_STATUS_UNPAID InvoiceStatus = 2 )
type LightningInvoiceIsPaid ¶
type LightningInvoiceIsPaid struct {
Id string `json:"id"`
}
type Timestamp ¶
type Timestamp struct { // Represents seconds of UTC time since Unix epoch // 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to // 9999-12-31T23:59:59Z inclusive. Seconds int64 `json:"seconds,omitempty"` // Non-negative fractions of a second at nanosecond resolution. Negative // second values with fractions must still have non-negative nanos values // that count forward in time. Must be from 0 to 999,999,999 // inclusive. Nanos int32 `json:"nanos,omitempty"` }
type TransactionStatus ¶
type TransactionStatus int32
const ( TransactionStatus_TRANSACTION_STATUS_UNSPECIFIED TransactionStatus = 0 TransactionStatus_TRANSACTION_STATUS_FAILED TransactionStatus = 1 TransactionStatus_TRANSACTION_STATUS_SUCCESS TransactionStatus = 2 TransactionStatus_TRANSACTION_STATUS_PENDING TransactionStatus = 3 TransactionStatus_TRANSACTION_STATUS_WAITING_TO_FINALIZE TransactionStatus = 4 )
type TransactionType ¶
type TransactionType int32
const ( TransactionType_TRANSACTION_TYPE_UNSPECIFIED TransactionType = 0 TransactionType_TRANSACTION_TYPE_INCOMING TransactionType = 1 TransactionType_TRANSACTION_TYPE_OUTGOING TransactionType = 2 )
type VerifyWebhookSignatureResponse ¶
type VerifyWebhookSignatureResponse struct {
IsValid bool `json:"is_valid"`
}
Click to show internal directories.
Click to hide internal directories.