model

package
v0.0.0-...-f5274a0 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2023 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDB

func NewDB(dialector gorm.Dialector, opts ...gorm.Option) (*gorm.DB, error)

Types

type Block

type Block struct {
	gorm.Model

	Hash     string
	Height   int32
	IsOrphan bool

	PreviousBlock string
	Version       int32
	Nonce         uint32
	Timestamp     time.Time
	Bits          uint32
	MerkleRoot    string
}

type OutPoint

type OutPoint struct {
	gorm.Model

	SpendingTxID    uint
	SpendingTxHash  string
	SpendingTxIndex uint32
	Sequence        uint32
	SignatureScript string
	Witness         string

	FundingTxID    uint
	FundingTxHash  string
	FundingTxIndex uint32
	PkScript       string
	Value          int64
	Spender        string
	Type           string
}

type Transaction

type Transaction struct {
	gorm.Model

	Hash     string
	LockTime uint32
	Version  int32
	Safe     bool

	BlockID    uint
	BlockHash  string
	BlockIndex uint32
}

Jump to

Keyboard shortcuts

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