Documentation
¶
Overview ¶
Package bpu contains the main functionality of the bpu package
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cell ¶
type Cell struct {
H *string `json:"h,omitempty" bson:"h,omitempty"`
B *string `json:"b,omitempty" bson:"b,omitempty"`
LB *string `json:"lb,omitempty" bson:"lb,omitempty"`
S *string `json:"s,omitempty" bson:"s,omitempty"`
LS *string `json:"ls,omitempty" bson:"ls,omitempty"`
I uint8 `json:"i" bson:"i"`
II uint8 `json:"ii" bson:"ii"`
Op *uint8 `json:"op,omitempty" bson:"op,omitempty"`
Ops *string `json:"ops,omitempty" bson:"ops,omitempty"`
}
Cell is a single OP_RETURN protocol
type E ¶
type E struct {
A *string `json:"a,omitempty" bson:"a,omitempty"`
V *uint64 `json:"v,omitempty" bson:"v,omitempty"`
I uint32 `json:"i" bson:"i"`
H *string `json:"h,omitempty" bson:"h,omitempty"`
}
E has address and value information
type IncludeType ¶
type IncludeType string
IncludeType is the type of include
const ( IncludeL IncludeType = "l" IncludeR IncludeType = "r" IncludeC IncludeType = "c" )
Include types
type ParseConfig ¶
type ParseConfig struct {
Tx *transaction.Transaction `json:"tx" bson:"tx"`
RawTxHex *string `json:"rawTx" bson:"rawTx"`
SplitConfig []SplitConfig `json:"split,omitempty" bson:"split,omitempty"`
Transform *Transform `json:"transform,omitempty" bson:"transform,omitempty"`
Mode *Mode `json:"mode,omitempty" bson:"mode,omitempty"`
}
ParseConfig is the configuration for parsing a transaction
type SplitConfig ¶
type SplitConfig struct {
Token *Token `json:"token,omitempty" bson:"token,omitempty"`
Include *IncludeType `json:"include,omitempty" bson:"include,omitempty"`
Require *uint8 `json:"require,omitempty" bson:"require,omitempty"`
}
SplitConfig is the configuration for splitting a transaction
type Token ¶
type Token struct {
S *string `json:"s" bson:"s"`
B *string `json:"b" bson:"b"`
Op *uint8 `json:"op" bson:"op"`
Ops *string `json:"ops" bson:"ops"`
}
Token is a token to split on
type Tx ¶
type Tx struct {
In []Input `json:"in"`
Out []Output `json:"out"`
ID string `json:"_id"`
Tx TxInfo `json:"tx"`
Blk Blk `json:"blk"`
Lock uint32 `json:"lock"`
}
Tx is a BOB formatted Bitcoin transaction
func Parse ¶
func Parse(config ParseConfig) (bpuTx *Tx, err error)
Parse is the main transformation function for the bpu package
Click to show internal directories.
Click to hide internal directories.
