Documentation
¶
Index ¶
- Constants
- Variables
- type Address
- type Block
- type BlockHeader
- type BytesReader
- type Covenant
- type DomainRecord
- type DomainResourceData
- type DsDomainRecord
- type GenericCovenant
- type Glue4DomainRecord
- type Glue6DomainRecord
- type NsDomainRecord
- type Outpoint
- type Proof
- type ProofNode
- type RegisterCovenant
- type Synth4DomainRecord
- type Synth6DomainRecord
- type TextDomainRecord
- type Transaction
- type TransactionInput
- type TransactionOutput
- type UpdateCovenant
Constants ¶
View Source
const ( CovenantTypeNone = 0 CovenantTypeClaim = 1 CovenantTypeOpen = 2 CovenantTypeBid = 3 CovenantTypeReveal = 4 CovenantTypeRedeem = 5 CovenantTypeRegister = 6 CovenantTypeUpdate = 7 CovenantTypeRenew = 8 CovenantTypeTransfer = 9 CovenantTypeFinalize = 10 CovenantTypeRevoke = 11 )
Covenant types
View Source
const ( DnsMaxName = 255 DnsMaxLabel = 63 )
View Source
const ( RecordTypeDS = 0 RecordTypeNS = 1 RecordTypeGLUE4 = 2 RecordTypeGLUE6 = 3 RecordTypeSYNTH4 = 4 RecordTypeSYNTH6 = 5 RecordTypeTEXT = 6 )
Record types
Variables ¶
View Source
var ( ProofSkip = []byte{0x02} ProofInternal = []byte{0x01} ProofLeaf = []byte{0x00} )
Functions ¶
This section is empty.
Types ¶
type Block ¶
type Block struct { Header BlockHeader Transactions []Transaction }
type BlockHeader ¶
type BytesReader ¶
func NewBytesReader ¶
func NewBytesReader(buf []byte) *BytesReader
func (*BytesReader) OriginalBytes ¶
func (b *BytesReader) OriginalBytes() []byte
type DomainRecord ¶
type DomainRecord interface {
// contains filtered or unexported methods
}
type DomainResourceData ¶
type DomainResourceData struct { Version uint8 Records []DomainRecord }
func NewDomainResourceDataFromBytes ¶
func NewDomainResourceDataFromBytes(data []byte) (*DomainResourceData, error)
type DsDomainRecord ¶
type GenericCovenant ¶
func (*GenericCovenant) Covenant ¶
func (c *GenericCovenant) Covenant() Covenant
type Glue4DomainRecord ¶
type Glue6DomainRecord ¶
type NsDomainRecord ¶
type NsDomainRecord struct {
Name string
}
type Proof ¶
type Proof struct { Type uint8 Depth uint16 Nodes []ProofNode Prefix []byte PrefixSize uint16 Left []byte Right []byte NxKey []byte NxHash []byte Value []byte }
func NewProofFromJson ¶
func (*Proof) UnmarshalJSON ¶
type ProofNode ¶
func (*ProofNode) UnmarshalJSON ¶
type RegisterCovenant ¶
type RegisterCovenant struct { NameHash []byte Height uint32 ResourceData DomainResourceData BlockHash []byte }
func NewRegisterCovenantFromGeneric ¶
func NewRegisterCovenantFromGeneric( gc *GenericCovenant, ) (*RegisterCovenant, error)
type Synth4DomainRecord ¶
type Synth6DomainRecord ¶
type TextDomainRecord ¶
type TextDomainRecord struct {
Items [][]byte
}
type Transaction ¶
type Transaction struct { Version uint32 Inputs []TransactionInput Outputs []TransactionOutput LockTime uint32 // contains filtered or unexported fields }
func NewTransactionFromReader ¶
func NewTransactionFromReader(r io.Reader) (*Transaction, error)
func (*Transaction) Hash ¶
func (t *Transaction) Hash() []byte
func (*Transaction) WitnessHash ¶
func (t *Transaction) WitnessHash() []byte
type TransactionInput ¶
func (*TransactionInput) DecodeWitness ¶
func (i *TransactionInput) DecodeWitness(r io.Reader) error
type TransactionOutput ¶
type TransactionOutput struct { Value uint64 Address Address Covenant GenericCovenant }
type UpdateCovenant ¶
type UpdateCovenant struct { NameHash []byte Height uint32 ResourceData DomainResourceData BlockHash []byte }
func NewUpdateCovenantFromGeneric ¶
func NewUpdateCovenantFromGeneric( gc *GenericCovenant, ) (*UpdateCovenant, error)
Click to show internal directories.
Click to hide internal directories.