Documentation
¶
Index ¶
- Constants
- func OpenConnPool(ctx context.Context, dbURI string) (conn *sqlite.Conn, pool *sqlitex.Pool, err error)
- type Chain
- func (chain *Chain) Apply(dbKeyMR *factom.Bytes32, eb factom.EBlock) (err error)
- func (chain *Chain) ApplyEntry(e factom.Entry) (txErr, err error)
- func (chain *Chain) ApplyFAT0Tx(ei int64, e factom.Entry) (tx fat0.Transaction, txErr, err error)
- func (chain *Chain) ApplyFAT1Tx(ei int64, e factom.Entry) (tx fat1.Transaction, txErr, err error)
- func (chain *Chain) Close()
- func (chain *Chain) LatestEntryTimestamp() time.Time
- func (chain *Chain) Save() func(txErr, err *error)
- func (chain *Chain) SetSync(height uint32, dbKeyMR *factom.Bytes32) error
- func (chain Chain) Validate() (err error)
Constants ¶
View Source
const (
PoolSize = 10
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Chain ¶
type Chain struct {
// General Factom Blockchain Data
ID *factom.Bytes32
Head factom.EBlock
HeadDBKeyMR *factom.Bytes32
NetworkID factom.NetworkID
SyncHeight uint32
SyncDBKeyMR *factom.Bytes32
// FAT Specific Data
TokenID string
IssuerChainID *factom.Bytes32
Identity factom.Identity
Issuance fat.Issuance
NumIssued uint64
DBFile string
Conn *sqlite.Conn // Read/Write
Pool *sqlitex.Pool // Read Only Pool
Log _log.Log
// contains filtered or unexported fields
}
func OpenNew ¶
func OpenNew(ctx context.Context, dbPath string, dbKeyMR *factom.Bytes32, eb factom.EBlock, networkID factom.NetworkID, identity factom.Identity) (chain Chain, err error)
dbPath must be path ending in os.Separator
func (*Chain) ApplyFAT0Tx ¶
func (*Chain) ApplyFAT1Tx ¶
func (*Chain) LatestEntryTimestamp ¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package addresses provides functions and SQL framents for working with the "addresses" table, which stores factom.FAAddress with its balance.
|
Package addresses provides functions and SQL framents for working with the "addresses" table, which stores factom.FAAddress with its balance. |
|
Package eblocks provides functions and SQL framents for working with the "eblocks" table, which stores factom.EBlock.
|
Package eblocks provides functions and SQL framents for working with the "eblocks" table, which stores factom.EBlock. |
|
Package entries provides functions and SQL framents for working with the "entries" table, which stores factom.Entry with a valid flag.
|
Package entries provides functions and SQL framents for working with the "entries" table, which stores factom.Entry with a valid flag. |
|
Package metadata provides functions and SQL framents for working with the "metadata" table, which stores the sync height, sync DBKeyMR, factom.NetworkID, and factom.Identity.
|
Package metadata provides functions and SQL framents for working with the "metadata" table, which stores the sync height, sync DBKeyMR, factom.NetworkID, and factom.Identity. |
|
Package nftokens provides functions and SQL framents for working with the "nf_tokens" table, which stores fat.NFToken with owner, creation id, and metadata.
|
Package nftokens provides functions and SQL framents for working with the "nf_tokens" table, which stores fat.NFToken with owner, creation id, and metadata. |
Click to show internal directories.
Click to hide internal directories.