Versions in this module Expand all Collapse all v1 v1.1.2 Sep 16, 2021 Changes in this version + var EmptyStringHash = NewHash(sha3.Sum256(nil)) + var ErrEntryType = errors.New("invalid entry type") + var ErrMissingEntry = errors.New("missing entry") + type AssetAmount struct + Amount uint64 + AssetId *AssetID + func (*AssetAmount) Descriptor() ([]byte, []int) + func (*AssetAmount) ProtoMessage() + func (a *AssetAmount) Equal(other *AssetAmount) (eq bool, err error) + func (a *AssetAmount) ReadFrom(r *blockchain.Reader) (err error) + func (a AssetAmount) WriteTo(w io.Writer) (int64, error) + func (m *AssetAmount) GetAmount() uint64 + func (m *AssetAmount) GetAssetId() *AssetID + func (m *AssetAmount) Reset() + func (m *AssetAmount) String() string + type AssetDefinition struct + Data *Hash + IssuanceProgram *Program + func (*AssetDefinition) Descriptor() ([]byte, []int) + func (*AssetDefinition) ProtoMessage() + func (ad *AssetDefinition) ComputeAssetID() (assetID AssetID) + func (m *AssetDefinition) GetData() *Hash + func (m *AssetDefinition) GetIssuanceProgram() *Program + func (m *AssetDefinition) Reset() + func (m *AssetDefinition) String() string + type AssetID struct + V0 uint64 + V1 uint64 + V2 uint64 + V3 uint64 + func ComputeAssetID(prog []byte, vmVersion uint64, data *Hash) AssetID + func NewAssetID(b [32]byte) (a AssetID) + func (*AssetID) Descriptor() ([]byte, []int) + func (*AssetID) ProtoMessage() + func (a *AssetID) IsZero() bool + func (a *AssetID) ReadFrom(r io.Reader) (int64, error) + func (a *AssetID) UnmarshalJSON(b []byte) error + func (a *AssetID) UnmarshalText(b []byte) error + func (a AssetID) Byte32() (b32 [32]byte) + func (a AssetID) Bytes() []byte + func (a AssetID) MarshalText() ([]byte, error) + func (a AssetID) WriteTo(w io.Writer) (int64, error) + func (m *AssetID) GetV0() uint64 + func (m *AssetID) GetV1() uint64 + func (m *AssetID) GetV2() uint64 + func (m *AssetID) GetV3() uint64 + func (m *AssetID) Reset() + func (m *AssetID) String() string + type Block struct + ID Hash + Transactions []*Tx + type BlockHeader struct + Bits uint64 + Height uint64 + Nonce uint64 + PreviousBlockId *Hash + Timestamp uint64 + TransactionStatus *TransactionStatus + TransactionStatusHash *Hash + TransactionsRoot *Hash + Version uint64 + func NewBlockHeader(version, height uint64, previousBlockID *Hash, timestamp uint64, ...) *BlockHeader + func (*BlockHeader) Descriptor() ([]byte, []int) + func (*BlockHeader) ProtoMessage() + func (m *BlockHeader) GetBits() uint64 + func (m *BlockHeader) GetHeight() uint64 + func (m *BlockHeader) GetNonce() uint64 + func (m *BlockHeader) GetPreviousBlockId() *Hash + func (m *BlockHeader) GetTimestamp() uint64 + func (m *BlockHeader) GetTransactionStatus() *TransactionStatus + func (m *BlockHeader) GetTransactionStatusHash() *Hash + func (m *BlockHeader) GetTransactionsRoot() *Hash + func (m *BlockHeader) GetVersion() uint64 + func (m *BlockHeader) Reset() + func (m *BlockHeader) String() string + type Coinbase struct + Arbitrary []byte + WitnessDestination *ValueDestination + func NewCoinbase(arbitrary []byte) *Coinbase + func (*Coinbase) Descriptor() ([]byte, []int) + func (*Coinbase) ProtoMessage() + func (c *Coinbase) SetDestination(id *Hash, val *AssetAmount, pos uint64) + func (m *Coinbase) GetArbitrary() []byte + func (m *Coinbase) GetWitnessDestination() *ValueDestination + func (m *Coinbase) Reset() + func (m *Coinbase) String() string + type Entry interface + type Hash struct + V0 uint64 + V1 uint64 + V2 uint64 + V3 uint64 + func EntryID(e Entry) (hash Hash) + func NewHash(b32 [32]byte) (h Hash) + func (*Hash) Descriptor() ([]byte, []int) + func (*Hash) ProtoMessage() + func (h *Hash) IsZero() bool + func (h *Hash) ReadFrom(r io.Reader) (int64, error) + func (h *Hash) UnmarshalJSON(b []byte) error + func (h *Hash) UnmarshalText(v []byte) error + func (h Hash) Byte32() (b32 [32]byte) + func (h Hash) Bytes() []byte + func (h Hash) MarshalText() ([]byte, error) + func (h Hash) WriteTo(w io.Writer) (int64, error) + func (m *Hash) GetV0() uint64 + func (m *Hash) GetV1() uint64 + func (m *Hash) GetV2() uint64 + func (m *Hash) GetV3() uint64 + func (m *Hash) Reset() + func (m *Hash) String() string + type Issuance struct + NonceHash *Hash + Ordinal uint64 + Value *AssetAmount + WitnessArguments [][]byte + WitnessAssetDefinition *AssetDefinition + WitnessDestination *ValueDestination + func NewIssuance(nonceHash *Hash, value *AssetAmount, ordinal uint64) *Issuance + func (*Issuance) Descriptor() ([]byte, []int) + func (*Issuance) ProtoMessage() + func (iss *Issuance) SetDestination(id *Hash, val *AssetAmount, pos uint64) + func (m *Issuance) GetNonceHash() *Hash + func (m *Issuance) GetOrdinal() uint64 + func (m *Issuance) GetValue() *AssetAmount + func (m *Issuance) GetWitnessArguments() [][]byte + func (m *Issuance) GetWitnessAssetDefinition() *AssetDefinition + func (m *Issuance) GetWitnessDestination() *ValueDestination + func (m *Issuance) Reset() + func (m *Issuance) String() string + type Mux struct + Program *Program + Sources []*ValueSource + WitnessArguments [][]byte + WitnessDestinations []*ValueDestination + func NewMux(sources []*ValueSource, program *Program) *Mux + func (*Mux) Descriptor() ([]byte, []int) + func (*Mux) ProtoMessage() + func (m *Mux) GetProgram() *Program + func (m *Mux) GetSources() []*ValueSource + func (m *Mux) GetWitnessArguments() [][]byte + func (m *Mux) GetWitnessDestinations() []*ValueDestination + func (m *Mux) Reset() + func (m *Mux) String() string + type Output struct + ControlProgram *Program + Ordinal uint64 + Source *ValueSource + func NewOutput(source *ValueSource, controlProgram *Program, ordinal uint64) *Output + func (*Output) Descriptor() ([]byte, []int) + func (*Output) ProtoMessage() + func (m *Output) GetControlProgram() *Program + func (m *Output) GetOrdinal() uint64 + func (m *Output) GetSource() *ValueSource + func (m *Output) Reset() + func (m *Output) String() string + type Program struct + Code []byte + VmVersion uint64 + func (*Program) Descriptor() ([]byte, []int) + func (*Program) ProtoMessage() + func (m *Program) GetCode() []byte + func (m *Program) GetVmVersion() uint64 + func (m *Program) Reset() + func (m *Program) String() string + type Retirement struct + Ordinal uint64 + Source *ValueSource + func NewRetirement(source *ValueSource, ordinal uint64) *Retirement + func (*Retirement) Descriptor() ([]byte, []int) + func (*Retirement) ProtoMessage() + func (m *Retirement) GetOrdinal() uint64 + func (m *Retirement) GetSource() *ValueSource + func (m *Retirement) Reset() + func (m *Retirement) String() string + type Spend struct + Ordinal uint64 + SpentOutputId *Hash + WitnessArguments [][]byte + WitnessDestination *ValueDestination + func NewSpend(spentOutputID *Hash, ordinal uint64) *Spend + func (*Spend) Descriptor() ([]byte, []int) + func (*Spend) ProtoMessage() + func (m *Spend) GetOrdinal() uint64 + func (m *Spend) GetSpentOutputId() *Hash + func (m *Spend) GetWitnessArguments() [][]byte + func (m *Spend) GetWitnessDestination() *ValueDestination + func (m *Spend) Reset() + func (m *Spend) String() string + func (s *Spend) SetDestination(id *Hash, val *AssetAmount, pos uint64) + type TransactionStatus struct + VerifyStatus []*TxVerifyResult + Version uint64 + func NewTransactionStatus() *TransactionStatus + func (*TransactionStatus) Descriptor() ([]byte, []int) + func (*TransactionStatus) ProtoMessage() + func (m *TransactionStatus) GetVerifyStatus() []*TxVerifyResult + func (m *TransactionStatus) GetVersion() uint64 + func (m *TransactionStatus) Reset() + func (m *TransactionStatus) String() string + func (ts *TransactionStatus) GetStatus(i int) (bool, error) + func (ts *TransactionStatus) SetStatus(i int, gasOnly bool) error + type Tx struct + Entries map[Hash]Entry + GasInputIDs []Hash + ID Hash + InputIDs []Hash + SpentOutputIDs []Hash + func (tx *Tx) Issuance(id Hash) (*Issuance, error) + func (tx *Tx) Output(id Hash) (*Output, error) + func (tx *Tx) SigHash(n uint32) (hash Hash) + func (tx *Tx) Spend(id Hash) (*Spend, error) + type TxHeader struct + ResultIds []*Hash + SerializedSize uint64 + TimeRange uint64 + Version uint64 + func NewTxHeader(version, serializedSize, timeRange uint64, resultIDs []*Hash) *TxHeader + func (*TxHeader) Descriptor() ([]byte, []int) + func (*TxHeader) ProtoMessage() + func (m *TxHeader) GetResultIds() []*Hash + func (m *TxHeader) GetSerializedSize() uint64 + func (m *TxHeader) GetTimeRange() uint64 + func (m *TxHeader) GetVersion() uint64 + func (m *TxHeader) Reset() + func (m *TxHeader) String() string + type TxVerifyResult struct + StatusFail bool + func (*TxVerifyResult) Descriptor() ([]byte, []int) + func (*TxVerifyResult) ProtoMessage() + func (m *TxVerifyResult) GetStatusFail() bool + func (m *TxVerifyResult) Reset() + func (m *TxVerifyResult) String() string + func (tvr *TxVerifyResult) WriteTo(w io.Writer) (int64, error) + type ValueDestination struct + Position uint64 + Ref *Hash + Value *AssetAmount + func (*ValueDestination) Descriptor() ([]byte, []int) + func (*ValueDestination) ProtoMessage() + func (m *ValueDestination) GetPosition() uint64 + func (m *ValueDestination) GetRef() *Hash + func (m *ValueDestination) GetValue() *AssetAmount + func (m *ValueDestination) Reset() + func (m *ValueDestination) String() string + type ValueSource struct + Position uint64 + Ref *Hash + Value *AssetAmount + func (*ValueSource) Descriptor() ([]byte, []int) + func (*ValueSource) ProtoMessage() + func (m *ValueSource) GetPosition() uint64 + func (m *ValueSource) GetRef() *Hash + func (m *ValueSource) GetValue() *AssetAmount + func (m *ValueSource) Reset() + func (m *ValueSource) String() string