types

package
v0.3.15 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2026 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 DelegateTask added in v0.3.14

type DelegateTask struct {
	ID                 string                `json:"id"`
	Status             string                `json:"status"`
	Fee                string                `json:"fee"`
	ScheduledAt        string                `json:"scheduledAt"`
	ScheduledAtUnix    int64                 `json:"scheduledAtUnix"` // Unix timestamp for client-side formatting
	ScheduledDate      string                `json:"scheduledDate"`   // Deprecated: use scheduledAtUnix
	ScheduledHour      string                `json:"scheduledHour"`   // Deprecated: use scheduledAtUnix
	FailReason         string                `json:"failReason,omitempty"`
	CommitmentTxid     string                `json:"commitmentTxid,omitempty"`
	DelegatorPublicKey string                `json:"delegatorPublicKey,omitempty"`
	Intent             *DelegateTaskIntent   `json:"intent,omitempty"`
	Forfeits           []DelegateTaskForfeit `json:"forfeits,omitempty"`
}

type DelegateTaskForfeit added in v0.3.14

type DelegateTaskForfeit struct {
	Outpoint string `json:"outpoint"` // Format: "txid:vout"
	Txid     string `json:"txid"`
}

type DelegateTaskIntent added in v0.3.14

type DelegateTaskIntent struct {
	Txid    string   `json:"txid"`
	Message string   `json:"message"`
	Proof   string   `json:"proof"`
	Inputs  []string `json:"inputs"` // Format: "txid:vout"
}

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