types

package
v0.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 23, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LockTime added in v0.3.0

type LockTime struct {
	Timelock  string `json:"lockTime"`
	IsSeconds bool   `json:"isSecs"`
}

type Payment added in v0.3.0

type Payment struct {
	Amount string `json:"amount"`
	Date   string `json:"date"`
	Hour   string `json:"hour"`
	Id     string `json:"id"`
	Kind   string `json:"kind"`   // "send" or "receive"
	Status string `json:"status"` // "pending", "refunding", "failed",  "completed"

	// This is the invoice expiration time
	ExpiresAt string `json:"expiresAt"`

	RefundLockTime *LockTime `json:"refundLockTime,omitempty"`

	PaymentTransfer *Transfer `json:"vhtlc,omitempty"`

	// If Payment Is Send and Failed
	ReclaimTransfer *Transfer `json:"redeemTransfer,omitempty"`
}

type PoolTxs

type PoolTxs struct {
	DateCreated int64        `json:"dateCreated"`
	Vtxos       []types.Vtxo `json:"vtxos"`
}

type Settings

type Settings struct {
	ApiRoot     string `json:"apiroot"`
	ServerUrl   string `json:"serverurl"`
	Currency    string `json:"currency"`
	EventServer string `json:"eventserver"`
	FullNode    string `json:"fullnode"`
	LnUrl       string `json:"lnurl"`
	Unit        string `json:"unit"`
}

type Swap added in v0.1.12

type Swap struct {
	Amount string `json:"amount"`
	Date   string `json:"date"`
	Hour   string `json:"hour"`
	Id     string `json:"id"`
	Kind   string `json:"kind"`
	Status string `json:"status"`

	ExpiresAt string `json:"expiry"`

	RefundLockTime *LockTime `json:"refundLockTime,omitempty"`

	// If Swap is Outbound, this is the Sent VHTLC
	VHTLCTransfer *Transfer `json:"vhtlc,omitempty"`
	// If Swap is Inbound, this is the Redeem Tx, else this is Txn of reclaim Failed Outbound Swap
	RedeemTransfer *Transfer `json:"redeemTransfer,omitempty"`
}

type Transaction

type Transaction struct {
	// Kind can be "swap" or "transfer" or "payment"
	Kind string `json:"kind"`

	Id string `json:"id"`

	DateCreated int64 `json:"dateCreated"`

	// Exactly one of these will be non-nil:
	Swap     *Swap     `json:"swap,omitempty"`
	Transfer *Transfer `json:"transfer,omitempty"`
	Payment  *Payment  `json:"payment,omitempty"`
}

type Transfer added in v0.1.12

type Transfer struct {
	Amount     string `json:"amount"`
	CreatedAt  string `json:"createdAt"`
	Day        string `json:"day"`
	Explorable bool   `json:"explorable"`
	Hour       string `json:"hour"`
	Kind       string `json:"kind"`
	Status     string `json:"status"`
	Txid       string `json:"txid"`
	UnixDate   int64  `json:"unixdate"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL