brc20

package
v0.0.0-...-6c424d2 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	EVENT_SEPARATOR = "|"
)

Global variables

Functions

func InitDB

func InitDB(cfg *db.DbConfig)

Initialize the database connection

Types

type Balance

type Balance struct {
	OverallBalance   int
	AvailableBalance int
}

Balance structure to hold overall and available balance

type Brc20BlockHashes

type Brc20BlockHashes struct {
	Id          string `gorm:"column:id;NOT NULL"`
	BlockHeight string `gorm:"column:block_height;NOT NULL"`
	BlockHash   string `gorm:"column:block_hash;NOT NULL"`
}

func (*Brc20BlockHashes) TableName

func (b *Brc20BlockHashes) TableName() string

type Brc20CumulativeEventHashes

type Brc20CumulativeEventHashes struct {
	Id                  string `gorm:"column:id;NOT NULL"`
	BlockHeight         int64  `gorm:"column:block_height;NOT NULL"`
	BlockEventHash      string `gorm:"column:block_event_hash;NOT NULL"`
	CumulativeEventHash string `gorm:"column:cumulative_event_hash;NOT NULL"`
}

func (*Brc20CumulativeEventHashes) TableName

func (b *Brc20CumulativeEventHashes) TableName() string

type Brc20EventTypes

type Brc20EventTypes struct {
	Id            string `gorm:"column:id;NOT NULL"`
	EventTypeName string `gorm:"column:event_type_name;NOT NULL"`
	EventTypeId   string `gorm:"column:event_type_id;NOT NULL"`
}

func (*Brc20EventTypes) TableName

func (b *Brc20EventTypes) TableName() string

type Brc20Events

type Brc20Events struct {
	Id            string `gorm:"column:id;NOT NULL"`
	EventType     string `gorm:"column:event_type;NOT NULL"`
	BlockHeight   string `gorm:"column:block_height;NOT NULL"`
	InscriptionId string `gorm:"column:inscription_id;NOT NULL"`
	Event         string `gorm:"column:event;NOT NULL"`
}

func (*Brc20Events) TableName

func (b *Brc20Events) TableName() string

type Brc20HistoricBalances

type Brc20HistoricBalances struct {
	Id               string          `gorm:"column:id;NOT NULL"`
	Pkscript         string          `gorm:"column:pkscript;NOT NULL"`
	Wallet           sql.NullString  `gorm:"column:wallet"`
	Tick             string          `gorm:"column:tick;NOT NULL"`
	OverallBalance   decimal.Decimal `gorm:"column:overall_balance;NOT NULL"`
	AvailableBalance decimal.Decimal `gorm:"column:available_balance;NOT NULL"`
	BlockHeight      string          `gorm:"column:block_height;NOT NULL"`
	EventId          string          `gorm:"column:event_id;NOT NULL"`
}

func (*Brc20HistoricBalances) TableName

func (b *Brc20HistoricBalances) TableName() string

type Brc20IndexerVersion

type Brc20IndexerVersion struct {
	Id               string `gorm:"column:id;NOT NULL"`
	IndexerVersion   string `gorm:"column:indexer_version;NOT NULL"`
	DbVersion        string `gorm:"column:db_version;NOT NULL"`
	EventHashVersion string `gorm:"column:event_hash_version;NOT NULL"`
}

func (*Brc20IndexerVersion) TableName

func (b *Brc20IndexerVersion) TableName() string

type Brc20Tickers

type Brc20Tickers struct {
	Id                  string `gorm:"column:id;NOT NULL"`
	OriginalTick        string `gorm:"column:original_tick;NOT NULL"`
	Tick                string `gorm:"column:tick;NOT NULL"`
	MaxSupply           string `gorm:"column:max_supply;NOT NULL"`
	Decimals            string `gorm:"column:decimals;NOT NULL"`
	LimitPerMint        string `gorm:"column:limit_per_mint;NOT NULL"`
	RemainingSupply     string `gorm:"column:remaining_supply;NOT NULL"`
	BurnedSupply        string `gorm:"column:burned_supply;default:0;NOT NULL"`
	IsSelfMint          string `gorm:"column:is_self_mint;NOT NULL"`
	DeployInscriptionId string `gorm:"column:deploy_inscription_id;NOT NULL"`
	BlockHeight         string `gorm:"column:block_height;NOT NULL"`
}

func (*Brc20Tickers) TableName

func (b *Brc20Tickers) TableName() string

type Event

type Event struct {
	ID            int64
	EventType     int
	BlockHeight   int64
	InscriptionID string
	Event         string
}

Event structure to hold event details

type Ticker

type Ticker struct {
	Tick                string
	OriginalTick        string
	MaxSupply           decimal.Decimal
	Decimals            int
	LimitPerMint        decimal.Decimal
	RemainingSupply     decimal.Decimal
	BlockHeight         int64
	IsSelfMint          bool
	DeployInscriptionID string
}

Ticker structure to hold ticker details

type WalletBalance

type WalletBalance struct {
	PkScript         string
	Wallet           string
	Tick             string
	OverallBalance   decimal.Decimal
	AvailableBalance decimal.Decimal
	BlockHeight      int64
	EventID          int64
}

WalletBalance structure to hold balance details

Jump to

Keyboard shortcuts

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