types

package
v0.0.0-...-b7c9c45 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FLAG_SCOPE_CREATORS = "creators"
	FLAG_SCOPE_SERIES   = "series"
	FLAG_SCOPE_ITEMS    = "items"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address struct {
	SKU             string `json:"sku"`
	Script          string `json:"script"`
	Address         string `json:"address"`
	Chain           string `json:"chain"`
	FastBlockHeight int64  `json:"fast_block_height"`
}

type AddressSummary

type AddressSummary struct {
	Address     string    `json:"address"`
	SKU         string    `json:"sku"`
	SeriesSlug  string    `json:"series_slug"`
	Serial      string    `json:"serial"`
	Unspent     int       `json:"unspent"`
	Spent       int       `json:"spent"`
	FirstActive time.Time `json:"first_active"`
	RedeemedOn  time.Time `json:"redeemed_on"`
	TotalValue  *BigInt   `json:"total_value"`
}

type BTCString

type BTCString string

func (*BTCString) MarshalJSON

func (b *BTCString) MarshalJSON() ([]byte, error)

func (*BTCString) NonZero

func (b *BTCString) NonZero() bool

func (BTCString) String

func (b BTCString) String() string

func (*BTCString) UnmarshalJSON

func (b *BTCString) UnmarshalJSON(data []byte) error

type BigInt

type BigInt struct {
	big.Int
}

TODO: Fix pointer/non-pointer issues

func FromBTCString

func FromBTCString(btc BTCString) *BigInt

func FromMathBigInt

func FromMathBigInt(i *big.Int) *BigInt

func (*BigInt) BigFloat

func (b *BigInt) BigFloat() *big.Float

func (*BigInt) BigInt

func (b *BigInt) BigInt() *big.Int

func (*BigInt) MarshalJSON

func (b *BigInt) MarshalJSON() ([]byte, error)

func (*BigInt) Positive

func (b *BigInt) Positive() bool

func (*BigInt) SatoshisToBTC

func (b *BigInt) SatoshisToBTC(strip bool) string

func (*BigInt) Scan

func (b *BigInt) Scan(src interface{}) error

func (*BigInt) UnmarshalJSON

func (b *BigInt) UnmarshalJSON(data []byte) error

func (BigInt) Value

func (b BigInt) Value() (driver.Value, error)

type BlockNotificationQueue

type BlockNotificationQueue struct {
	BlockHeight int64     `json:"block_height"`
	BlockTime   time.Time `json:"block_time"`
	Chain       string    `json:"chain"`
	CreatedAt   time.Time `json:"created_at"`
}

type Creator

type Creator struct {
	Name      string    `json:"name"`
	CreatedAt time.Time `json:"created_at"`
	Slug      string    `json:"slug"`
}

type CreatorSummary

type CreatorSummary struct {
	Name        string  `json:"name"`
	Slug        string  `json:"slug"`
	SeriesCount int     `json:"series_count"`
	ItemCount   int     `json:"item_count"`
	TotalValue  *BigInt `json:"total_value"`
	Unfunded    int     `json:"unfunded"`
	Redeemed    int     `json:"redeemed"`
	Unredeemed  int     `json:"unredeemed"`
}

type Flag

type Flag struct {
	FlagScope string `json:"flag_scope"`
	FlagType  string `json:"flag_type"`
	FlagKey   string `json:"flag_key"`
}

type GeneralStatistics

type GeneralStatistics struct {
	Creators      int     `json:"creators"`
	Series        int     `json:"series"`
	Items         int     `json:"items"`
	Addresses     int     `json:"addresses"`
	TotalValue    *BigInt `json:"total_value"`
	TotalRedeemed *BigInt `json:"total_redeemed"`
}

type GodView

type GodView struct {
	SeriesName  string    `json:"series_name"`
	SeriesID    string    `json:"series_id"`
	Creators    string    `json:"creators"`
	ItemID      string    `json:"item_id"`
	Serial      *string   `json:"serial"`
	Addresses   *string   `json:"address"`
	TotalValue  *BigInt   `json:"total_value"`
	FirstActive time.Time `json:"first_active"`
	RedeemedOn  time.Time `json:"redeemed_on"`
	Balance     *BigInt   `json:"balance"`
}

func (GodView) SerialString

func (g GodView) SerialString() string

type GradingSlab

type GradingSlab struct {
	SKU        string `json:"sku"`
	Service    string `json:"service"`
	Identifier string `json:"identifier"`
	Grade      string `json:"grade"`
	ViewLink   string `json:"view_link"`
}

type Item

type Item struct {
	SKU        string    `json:"sku"`
	SeriesSlug string    `json:"series_slug"`
	Serial     string    `json:"serial"`
	CreatedAt  time.Time `json:"created_at"`
}

type ItemAddressSummary

type ItemAddressSummary struct {
	SKU         string    `json:"sku"`
	Serial      string    `json:"serial"`
	Addresses   string    `json:"addresses"`
	FirstActive time.Time `json:"first_active"`
	RedeemedOn  time.Time `json:"redeemed_on"`
	TotalValue  *BigInt   `json:"total_value"`
	SeriesName  string    `json:"series_name"`
	SeriesSlug  string    `json:"series_slug"`
}

func (*ItemAddressSummary) AddressArray

func (is *ItemAddressSummary) AddressArray() ([]string, error)

func (*ItemAddressSummary) SerialString

func (is *ItemAddressSummary) SerialString() string

type ItemSummary

type ItemSummary struct {
	SKU           string  `json:"sku"`
	Serial        string  `json:"serial"`
	SeriesName    string  `json:"series_name"`
	SeriesSlug    string  `json:"series_slug"`
	TotalValue    *BigInt `json:"total_value"`
	Unspent       int     `json:"unspent"`
	Spent         int     `json:"spent"`
	TotalReceived *BigInt `json:"total_received"`
	TotalSpent    *BigInt `json:"total_spent"`
	Unfunded      int     `json:"unfunded"`
	Unredeemed    int     `json:"unredeemed"`
	Redeemed      int     `json:"redeemed"`
}

func (*ItemSummary) SerialString

func (is *ItemSummary) SerialString() string

type Outpoint

type Outpoint struct {
	Txid                string    `json:"txid"`
	Vout                int       `json:"vout"`
	Script              string    `json:"script"`
	Value               *BigInt   `json:"value"`
	BlockHeight         int64     `json:"block_height"`
	BlockTime           time.Time `json:"block_time"`
	SpendingTxid        string    `json:"spending_txid"`
	SpendingVin         int       `json:"spending_vin"`
	SpendingBlockHeight int64     `json:"spending_block_height"`
	SpendingBlockTime   time.Time `json:"spending_block_time"`
	Chain               string    `json:"chain"`
}

type ScriptQueue

type ScriptQueue struct {
	Script    string    `json:"script"`
	Chain     string    `json:"chain"`
	TryCount  int       `json:"try_count"`
	CreatedAt time.Time `json:"created_at"`
}

type Series

type Series struct {
	Name      string    `json:"name"`
	Slug      string    `json:"slug"`
	CreatedAt time.Time `json:"created_at"`
}

type SeriesCreator

type SeriesCreator struct {
	SeriesSlug  string `json:"series_slug"`
	CreatorSlug string `json:"creator_slug"`
}

type SeriesSummary

type SeriesSummary struct {
	Slug       string    `json:"slug"`
	Name       string    `json:"name"`
	ItemCount  int       `json:"item_count"`
	TotalValue *BigInt   `json:"total_value"`
	Unfunded   int       `json:"unfunded"`
	Unredeemed int       `json:"unredeemed"`
	Redeemed   int       `json:"redeemed"`
	Creators   []Creator `json:"creators"`
}

type TelegramSubscription

type TelegramSubscription struct {
	ChatID int64  `json:"chat_id"`
	Scope  string `json:"scope"`
	Slug   string `json:"slug"`
	Active bool   `json:"active"`
}

type Transaction

type Transaction struct {
	Txid            string    `json:"txid"`
	Vout            *int      `json:"vout"`
	Vin             *int      `json:"vin"`
	OriginalTxid    *string   `json:"original_txid"`
	Value           *BigInt   `json:"value"`
	BlockHeight     int       `json:"block_height"`
	BlockTime       time.Time `json:"block_time"`
	TransactionType string    `json:"transaction_type"`
	SKU             string    `json:"sku"`
	SeriesSlug      string    `json:"series_slug"`
	Serial          string    `json:"serial"`
	SeriesName      string    `json:"series_name"`
}

func (*Transaction) Outpoint

func (t *Transaction) Outpoint() string

type TransactionQueue

type TransactionQueue struct {
	Txid        string    `json:"txid"`
	Chain       string    `json:"chain"`
	BlockHeight int64     `json:"block_height"`
	TryCount    int       `json:"try_count"`
	CreatedAt   time.Time `json:"created_at"`
}

Jump to

Keyboard shortcuts

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