Documentation ¶
Index ¶
- Constants
- Variables
- func AddressED25519MatchesPrivateKey(addr AddressED25519, privateKey ed25519.PrivateKey) bool
- func BelongsToAccount(lock Lock, acc Accountable) bool
- func DiffTicks(t1, t2 Time) int64
- func EqualAccountables(a1, a2 Accountable) bool
- func EqualConstraints(l1, l2 Constraint) bool
- func EqualOutputs(o1, o2 *OutputWithID) bool
- func EqualTransactionIDs(txid1, txid2 *TransactionID) bool
- func Init(id *IdentityData, verbose ...bool)
- func InitWithTestingLedgerIDData(opts ...func(data *IdentityData)) ed25519.PrivateKey
- func LessTxID(txid1, txid2 TransactionID) bool
- func MinimumStorageDeposit(o *Output, extraWeight uint32) uint64
- func MustOutputIndexFromIDBytes(data []byte) byte
- func NameByPrefix(prefix []byte) (string, bool)
- func NewChainLockUnlockParams(chainOutputIndex, chainConstraintIndex byte) []byte
- func NewChainUnlockParams(successorOutputIdx, successorConstraintBlockIndex, transitionMode byte) []byte
- func NewTransactionIDPrefix(slot Slot, sequencerTxFlag bool) (ret [4]byte)
- func OutputFromBytesMain(data []byte) (*Output, Amount, Lock, error)
- func OutputIDIndexFromBytes(data []byte) (ret byte, err error)
- func OutputsWithIdToString(outs ...*OutputWithID) string
- func SlotDuration() time.Duration
- func TickDuration() time.Duration
- func TooCloseOnTimeAxis(txid1, txid2 *TransactionID) bool
- func TransactionIDAsFileName(ts Time, txHash TransactionIDShort, sequencerFlag, branchFlag bool) string
- func TransactionIDString(ts Time, txHash TransactionIDShort, sequencerFlag bool) string
- func TransactionIDStringShort(ts Time, txHash TransactionIDShort, sequencerFlag bool) string
- func TransactionIDStringVeryShort(ts Time, txHash TransactionIDShort, sequencerFlag bool) string
- func TransactionPace() int
- func TransactionPaceSequencer() int
- func ValidSequencerPace(t1, t2 Time) bool
- func ValidSlot(slot Slot) bool
- func ValidTime(ts Time) bool
- func ValidTransactionPace(t1, t2 Time) bool
- func WithSequencerPace(ticks byte) func(id *IdentityData)
- func WithTickDuration(d time.Duration) func(id *IdentityData)
- func WithTransactionPace(ticks byte) func(id *IdentityData)
- type AccountID
- type Accountable
- type AddressED25519
- func AddressED25519FromBytes(data []byte) (AddressED25519, error)
- func AddressED25519FromPrivateKey(privateKey ed25519.PrivateKey) AddressED25519
- func AddressED25519FromPublicKey(pubKey ed25519.PublicKey) AddressED25519
- func AddressED25519FromSource(src string) (AddressED25519, error)
- func AddressED25519Null() AddressED25519
- func AddressED25519Random() AddressED25519
- func AddressesED25519FromPrivateKeys(privateKeys []ed25519.PrivateKey) []AddressED25519
- func (a AddressED25519) AccountID() AccountID
- func (a AddressED25519) Accounts() []Accountable
- func (a AddressED25519) AsLock() Lock
- func (a AddressED25519) Bytes() []byte
- func (a AddressED25519) Clone() AddressED25519
- func (a AddressED25519) Name() string
- func (a AddressED25519) Short() string
- func (a AddressED25519) String() string
- type Amount
- type ChainConstraint
- type ChainID
- func (id *ChainID) AsAccountID() AccountID
- func (id *ChainID) AsChainLock() ChainLock
- func (id *ChainID) Bytes() []byte
- func (id *ChainID) MarshalJSON() ([]byte, error)
- func (id *ChainID) String() string
- func (id *ChainID) StringHex() string
- func (id *ChainID) StringShort() string
- func (id *ChainID) StringVeryShort() string
- func (id *ChainID) UnmarshalJSON(hexStrData []byte) error
- type ChainLock
- type CommitToSibling
- type ConditionalLock
- type Constraint
- type DataContext
- type DeadlineLock
- type GeneralScript
- type IdentityData
- func DefaultIdentityData(privateKey ed25519.PrivateKey) *IdentityData
- func GetTestingIdentityData(seed ...int) (*IdentityData, ed25519.PrivateKey)
- func IdentityDataFromBytes(data []byte) (*IdentityData, error)
- func MustIdentityDataFromBytes(data []byte) *IdentityData
- func StateIdentityDataFromYAML(yamlData []byte) (*IdentityData, error)
- func (id *IdentityData) Bytes() []byte
- func (id *IdentityData) EnsurePostBranchConsolidationConstraintTimestamp(ts Time) Time
- func (id *IdentityData) GenesisControlledAddress() AddressED25519
- func (id *IdentityData) GenesisTime() time.Time
- func (id *IdentityData) GenesisTimeUnixNano() int64
- func (id *IdentityData) Hash() [32]byte
- func (id *IdentityData) IsPostBranchConsolidationTimestamp(ts Time) bool
- func (id *IdentityData) IsPreBranchConsolidationTimestamp(ts Time) bool
- func (id *IdentityData) LedgerTimeFromClockTime(nowis time.Time) Time
- func (id *IdentityData) Lines(prefix ...string) *lines.Lines
- func (id *IdentityData) OriginChainID() ChainID
- func (id *IdentityData) SetTickDuration(d time.Duration)
- func (id *IdentityData) SlotDuration() time.Duration
- func (id *IdentityData) SlotsPerDay() int
- func (id *IdentityData) SlotsPerYear() int
- func (id *IdentityData) String() string
- func (id *IdentityData) TicksPerYear() int
- func (id *IdentityData) TimeConstantsToString() string
- func (id *IdentityData) TimeToTicksSinceGenesis(nowis time.Time) int64
- func (id *IdentityData) YAML() []byte
- func (id *IdentityData) YAMLAble() *IdentityDataYAMLAble
- type IdentityDataYAMLAble
- type Immutable
- type InflationConstraint
- type Library
- func (lib *Library) AmountFactor(inTs Time, inAmount uint64) uint64
- func (lib *Library) BranchInflationBonusFromRandomnessProof(proof []byte) uint64
- func (lib *Library) CalcChainInflationAmount(inTs, outTs Time, inAmount, delayed uint64) uint64
- func (lib *Library) CompileLocalLibrary(source string) ([]byte, error)
- func (lib *Library) Const() LibraryConst
- func (lib *Library) InsideInflationOpportunityWindow(diffTicks int64) bool
- func (lib *Library) UpperSupplyBound(inTs Time) uint64
- type LibraryConst
- type Lock
- type LockBalance
- type MilestoneData
- type Output
- func (o *Output) AccountIDs() []AccountID
- func (o *Output) Amount() uint64
- func (o *Output) AsArray() *lazybytes.Array
- func (o *Output) Bytes() []byte
- func (o *Output) ChainConstraint() (*ChainConstraint, byte)
- func (o *Output) Clone(overrideReadOnly ...func(o *Output)) *Output
- func (o *Output) ConstraintAt(idx byte) []byte
- func (o *Output) ConstraintsRawBytes() [][]byte
- func (o *Output) ForEachConstraint(fun func(idx byte, constr []byte) bool)
- func (o *Output) Inflation(branch bool) uint64
- func (o *Output) InflationConstraint() (*InflationConstraint, byte)
- func (o *Output) Lines(prefix ...string) *lines.Lines
- func (o *Output) Lock() Lock
- func (o *Output) MustHaveConstraintAnyOfAt(pos byte, names ...string)
- func (o *Output) MustStemLock() *StemLock
- func (o *Output) MustValidOutput()
- func (o *Output) NumConstraints() int
- func (o *Output) PushConstraint(c []byte) (byte, error)
- func (o *Output) PutAmount(amount uint64)
- func (o *Output) PutConstraint(c []byte, idx byte)
- func (o *Output) PutLock(lock Lock)
- func (o *Output) SenderED25519() (AddressED25519, byte)
- func (o *Output) SequencerOutputData() (*SequencerOutputData, bool)
- func (o *Output) StemLock() (*StemLock, bool)
- func (o *Output) TimeLock() (uint32, bool)
- func (o *Output) ToString(prefix ...string) string
- func (o *Output) WithAmount(amount uint64) *Output
- func (o *Output) WithLock(lock Lock) *Output
- type OutputDataWithChainID
- type OutputDataWithID
- type OutputID
- func (oid *OutputID) Bytes() []byte
- func (oid *OutputID) Index() byte
- func (oid *OutputID) IsBranchTransaction() bool
- func (oid *OutputID) IsSequencerTransaction() bool
- func (oid *OutputID) Slot() Slot
- func (oid *OutputID) String() string
- func (oid *OutputID) StringHex() string
- func (oid *OutputID) StringShort() string
- func (oid *OutputID) StringVeryShort() string
- func (oid *OutputID) Timestamp() Time
- func (oid *OutputID) TransactionHash() (ret TransactionIDShort)
- func (oid *OutputID) TransactionID() (ret TransactionID)
- type OutputWithChainID
- type OutputWithID
- func (o *OutputWithID) AsChainOutput() (*OutputWithChainID, error)
- func (o *OutputWithID) Clone() *OutputWithID
- func (o *OutputWithID) ExtractChainID() (ChainID, byte, bool)
- func (o *OutputWithID) IDShort() string
- func (o *OutputWithID) Lines(prefix ...string) *lines.Lines
- func (o *OutputWithID) MustAsChainOutput() *OutputWithChainID
- func (o *OutputWithID) Short() string
- func (o *OutputWithID) String() string
- func (o *OutputWithID) Timestamp() Time
- type Parser
- type RoyaltiesED25519
- type SenderED25519
- type SequencerConstraint
- type SequencerOutputData
- type Slot
- type StemLock
- type Time
- func (t Time) AddSlots(slot Slot) Time
- func (t Time) AddTicks(ticks int) Time
- func (t Time) After(t1 Time) bool
- func (t Time) AfterOrEqual(t1 Time) bool
- func (t Time) AsFileName() string
- func (t Time) Before(t1 Time) bool
- func (t Time) BeforeOrEqual(t1 Time) bool
- func (t Time) Bytes() []byte
- func (t Time) Hex() string
- func (t Time) IsSlotBoundary() bool
- func (t Time) NextSlotBoundary() Time
- func (t Time) Short() string
- func (t Time) Slot() Slot
- func (t Time) Source() string
- func (t Time) String() string
- func (t Time) Tick() uint8
- func (t Time) TicksSinceGenesis() int64
- func (t Time) TicksToNextSlotBoundary() int
- func (t Time) Time() time.Time
- func (t Time) UnixNano() int64
- type Timelock
- type TotalAmount
- type TransactionID
- func GenesisTransactionID() *TransactionID
- func NewTransactionID(ts Time, h TransactionIDShort, sequencerTxFlag bool) (ret TransactionID)
- func RandomTransactionID(sequencerFlag bool) TransactionID
- func TransactionIDFromBytes(data []byte) (ret TransactionID, err error)
- func TransactionIDFromHexString(str string) (ret TransactionID, err error)
- func (txid *TransactionID) AsFileName() string
- func (txid *TransactionID) Bytes() []byte
- func (txid *TransactionID) IsBranchTransaction() bool
- func (txid *TransactionID) IsSequencerMilestone() bool
- func (txid *TransactionID) MarshalJSON() ([]byte, error)
- func (txid *TransactionID) ShortID() (ret TransactionIDShort)
- func (txid *TransactionID) Slot() Slot
- func (txid *TransactionID) String() string
- func (txid *TransactionID) StringHex() string
- func (txid *TransactionID) StringShort() string
- func (txid *TransactionID) StringVeryShort() string
- func (txid *TransactionID) Timestamp() (ret Time)
- func (txid *TransactionID) UnmarshalJSON(hexStrData []byte) error
- func (txid *TransactionID) VeryShortID4() (ret TransactionIDVeryShort4)
- func (txid *TransactionID) VeryShortID8() (ret TransactionIDVeryShort8)
- type TransactionIDShort
- type TransactionIDVeryShort4
- type TransactionIDVeryShort8
Constants ¶
const ( TrieArity = common.PathArity16 TrieHashSize = trie_blake2b.HashSize256 )
const ( BootstrapSequencerName = "boot" // BoostrapSequencerIDHex is a constant BoostrapSequencerIDHex = "af7bedde1fea222230b82d63d5b665ac75afbe4ad3f75999bb3386cf994a6963" )
const ( TransactionIDShortLength = 27 TransactionIDLength = TimeByteLength + TransactionIDShortLength OutputIDLength = TransactionIDLength + 1 ChainIDLength = 32 SequencerTxFlagHigherByte = byte(0b10000000) )
const ( GenesisOutputIndex = byte(0) GenesisStemOutputIndex = byte(1) )
const ( DefaultTickDuration = 40 * time.Millisecond DefaultSlotDuration = DefaultTickDuration * TicksPerSlot // ~10.24 sec DaysPerYear = 365 DefaultInflationEpochDuration = DaysPerYear * 24 * time.Hour // standard inflation epoch is 365 days DefaultSlotsPerInflationEpoch = uint64(DefaultInflationEpochDuration / DefaultSlotDuration) DustPerProxi = 1_000_000 BaseTokenName = "Proxi" BaseTokenNameTicker = "PRXI" DustTokenName = "dust" PRXI = DustPerProxi InitialSupplyProxi = 1_000_000_000 DefaultInitialSupply = InitialSupplyProxi * PRXI DefaultBranchInflationBonusBase = 5_000_000 DefaultChainInflationPerTickBase = 160_000 DefaultChainInflationOpportunitySlots = 12 DefaultTicksPerInflationEpoch = DefaultSlotsPerInflationEpoch * TicksPerSlot TargetAnnualChainInflationRateUpper = 13 TargetAnnualChainInflationRateLower = 12 DefaultVBCost = 1 DefaultTransactionPace = 25 DefaultTransactionPaceSequencer = 3 // DefaultMinimumAmountOnSequencer Reasonable limit could be 1/1000 of initial supply DefaultMinimumAmountOnSequencer = 1_000 * PRXI // this is testnet default DefaultMaxNumberOfEndorsements = 8 DefaultPreBranchConsolidationTicks = 50 DefaultPostBranchConsolidationTicks = 25 )
const ( SlotByteLength = 4 TimeByteLength = SlotByteLength + 1 // bytes MaxSlot = 0xffffffff >> 1 // 1 most significant bit must be 0 MaxTick = 0xff MaxTime = (MaxSlot << 8) | MaxTick TicksPerSlot = MaxTick + 1 )
const ( TransactionBranch = byte(iota) ConsumedBranch )
Top level branches
const ( TxUnlockData = byte(iota) TxInputIDs TxOutputs TxSignature TxSequencerAndStemOutputIndices TxTimestamp TxTotalProducedAmount TxInputCommitment TxEndorsements TxLocalLibraries TxTreeIndexMax )
Transaction tree
const ( ConstraintIndexAmount = byte(iota) ConstraintIndexLock ConstraintIndexFirstOptionalConstraint )
Mandatory output block indices
const (
//AddressED25519Name = "addressED25519"
AddressED25519Name = "a"
)
const (
AmountConstraintName = "amount"
)
const (
ChainConstraintName = "chain"
)
const (
ChainLockName = "chainLock"
)
const (
CommitToSiblingName = "commitToSibling"
)
const ConditionalLockName = "conditionalLock"
const (
ConsumedOutputsBranch = byte(iota)
)
const (
DeadlineLockName = "deadlineLock"
)
const (
ImmutableName = "immutable"
)
const (
InflationConstraintName = "inflation"
)
const MilestoneDataFixedIndex = 4
const (
RoyaltiesED25519Name = "royaltiesED25519"
)
const (
SenderAddressED25519Name = "senderED25519"
)
const (
SequencerConstraintName = "sequencer"
)
const (
StemLockName = "stemLock"
)
const (
TimelockName = "timelock"
)
const (
TotalAmountConstraintName = "total"
)
Variables ¶
var ( PathToConsumedOutputs = lazybytes.Path(ConsumedBranch, ConsumedOutputsBranch) PathToProducedOutputs = lazybytes.Path(TransactionBranch, TxOutputs) PathToUnlockParams = lazybytes.Path(TransactionBranch, TxUnlockData) PathToInputIDs = lazybytes.Path(TransactionBranch, TxInputIDs) PathToSignature = lazybytes.Path(TransactionBranch, TxSignature) PathToSequencerAndStemOutputIndices = lazybytes.Path(TransactionBranch, TxSequencerAndStemOutputIndices) PathToInputCommitment = lazybytes.Path(TransactionBranch, TxInputCommitment) PathToEndorsements = lazybytes.Path(TransactionBranch, TxEndorsements) PathToLocalLibraries = lazybytes.Path(TransactionBranch, TxLocalLibraries) PathToTimestamp = lazybytes.Path(TransactionBranch, TxTimestamp) PathToTotalProducedAmount = lazybytes.Path(TransactionBranch, TxTotalProducedAmount) )
var CommitmentModel = trie_blake2b.New(TrieArity, TrieHashSize)
var NilChainLock = ChainLockFromChainID(NilChainID)
var NilTimelock = Timelock(0)
var StemAccountID = AccountID([]byte{0})
Functions ¶
func AddressED25519MatchesPrivateKey ¶
func AddressED25519MatchesPrivateKey(addr AddressED25519, privateKey ed25519.PrivateKey) bool
func BelongsToAccount ¶
func BelongsToAccount(lock Lock, acc Accountable) bool
func DiffTicks ¶
DiffTicks returns difference in ticks between two timestamps: < 0 is t1 is before t2 > 0 if t2 is before t1 (i.e. t1 - t2)
func EqualAccountables ¶
func EqualAccountables(a1, a2 Accountable) bool
func EqualConstraints ¶
func EqualConstraints(l1, l2 Constraint) bool
func EqualOutputs ¶
func EqualOutputs(o1, o2 *OutputWithID) bool
func EqualTransactionIDs ¶
func EqualTransactionIDs(txid1, txid2 *TransactionID) bool
func Init ¶
func Init(id *IdentityData, verbose ...bool)
func InitWithTestingLedgerIDData ¶
func InitWithTestingLedgerIDData(opts ...func(data *IdentityData)) ed25519.PrivateKey
InitWithTestingLedgerIDData for testing
func LessTxID ¶
func LessTxID(txid1, txid2 TransactionID) bool
LessTxID compares tx IDs b timestamp and by tx hash
func MinimumStorageDeposit ¶
func NameByPrefix ¶
func NewChainUnlockParams ¶
func NewChainUnlockParams(successorOutputIdx, successorConstraintBlockIndex, transitionMode byte) []byte
NewChainUnlockParams unlock parameters for the chain constraint. 3 bytes: 0 - successor output index 1 - successor block index 2 - transition mode must be equal to the transition mode in the successor constraint data
func NewTransactionIDPrefix ¶
NewTransactionIDPrefix used for database iteration by prefix, i.e. all transaction IDs of specific slot
func OutputIDIndexFromBytes ¶
OutputIDIndexFromBytes optimizes memory usage
func OutputsWithIdToString ¶
func OutputsWithIdToString(outs ...*OutputWithID) string
func SlotDuration ¶
func TickDuration ¶
func TooCloseOnTimeAxis ¶
func TooCloseOnTimeAxis(txid1, txid2 *TransactionID) bool
func TransactionIDAsFileName ¶
func TransactionIDAsFileName(ts Time, txHash TransactionIDShort, sequencerFlag, branchFlag bool) string
func TransactionIDString ¶
func TransactionIDString(ts Time, txHash TransactionIDShort, sequencerFlag bool) string
func TransactionIDStringShort ¶
func TransactionIDStringShort(ts Time, txHash TransactionIDShort, sequencerFlag bool) string
func TransactionIDStringVeryShort ¶
func TransactionIDStringVeryShort(ts Time, txHash TransactionIDShort, sequencerFlag bool) string
func TransactionPace ¶
func TransactionPace() int
func TransactionPaceSequencer ¶
func TransactionPaceSequencer() int
func ValidSequencerPace ¶
ValidSequencerPace return true is subsequent input and target sequencer tx timestamps make a valid pace
func ValidTransactionPace ¶
ValidTransactionPace return true is subsequent input and target non-sequencer tx timestamps make a valid pace
func WithSequencerPace ¶
func WithSequencerPace(ticks byte) func(id *IdentityData)
func WithTickDuration ¶
func WithTickDuration(d time.Duration) func(id *IdentityData)
func WithTransactionPace ¶
func WithTransactionPace(ticks byte) func(id *IdentityData)
Types ¶
type Accountable ¶
type Accountable interface { Constraint AccountID() AccountID AsLock() Lock }
func AccountableFromBytes ¶
func AccountableFromBytes(data []byte) (Accountable, error)
func AccountableFromSource ¶
func AccountableFromSource(src string) (Accountable, error)
func NoDuplicatesAccountables ¶
func NoDuplicatesAccountables(acc []Accountable) []Accountable
type AddressED25519 ¶
type AddressED25519 []byte
func AddressED25519FromBytes ¶
func AddressED25519FromBytes(data []byte) (AddressED25519, error)
func AddressED25519FromPrivateKey ¶
func AddressED25519FromPrivateKey(privateKey ed25519.PrivateKey) AddressED25519
func AddressED25519FromPublicKey ¶
func AddressED25519FromPublicKey(pubKey ed25519.PublicKey) AddressED25519
func AddressED25519FromSource ¶
func AddressED25519FromSource(src string) (AddressED25519, error)
func AddressED25519Null ¶
func AddressED25519Null() AddressED25519
func AddressED25519Random ¶
func AddressED25519Random() AddressED25519
func AddressesED25519FromPrivateKeys ¶
func AddressesED25519FromPrivateKeys(privateKeys []ed25519.PrivateKey) []AddressED25519
func (AddressED25519) AccountID ¶
func (a AddressED25519) AccountID() AccountID
func (AddressED25519) Accounts ¶
func (a AddressED25519) Accounts() []Accountable
func (AddressED25519) AsLock ¶
func (a AddressED25519) AsLock() Lock
func (AddressED25519) Bytes ¶
func (a AddressED25519) Bytes() []byte
func (AddressED25519) Clone ¶
func (a AddressED25519) Clone() AddressED25519
func (AddressED25519) Name ¶
func (a AddressED25519) Name() string
func (AddressED25519) Short ¶
func (a AddressED25519) Short() string
func (AddressED25519) String ¶
func (a AddressED25519) String() string
type ChainConstraint ¶
type ChainConstraint struct { // ID all-0 for origin ID ChainID // 0xFF for origin, 0x00 for state transition, other reserved TransitionMode byte // Previous index of the consumed chain input with the same ID. Must be 0xFF for the origin PredecessorInputIndex byte PredecessorConstraintIndex byte }
ChainConstraint is a chain constraint
func ChainConstraintFromBytes ¶
func ChainConstraintFromBytes(data []byte) (*ChainConstraint, error)
func NewChainConstraint ¶
func NewChainConstraint(id ChainID, prevOut, prevBlock, mode byte) *ChainConstraint
func NewChainOrigin ¶
func NewChainOrigin() *ChainConstraint
func (*ChainConstraint) Bytes ¶
func (ch *ChainConstraint) Bytes() []byte
func (*ChainConstraint) IsOrigin ¶
func (ch *ChainConstraint) IsOrigin() bool
func (*ChainConstraint) Name ¶
func (ch *ChainConstraint) Name() string
func (*ChainConstraint) String ¶
func (ch *ChainConstraint) String() string
type ChainID ¶
type ChainID [ChainIDLength]byte
ChainID all-0 for origin
var BoostrapSequencerID ChainID
BoostrapSequencerID is a constant
var NilChainID ChainID
func ChainIDFromBytes ¶
func ChainIDFromHexString ¶
func MakeOriginChainID ¶
func RandomChainID ¶
func RandomChainID() (ret ChainID)
func (*ChainID) AsAccountID ¶
func (*ChainID) AsChainLock ¶
func (*ChainID) MarshalJSON ¶
func (*ChainID) StringShort ¶
func (*ChainID) StringVeryShort ¶
func (*ChainID) UnmarshalJSON ¶
type ChainLock ¶
type ChainLock []byte
func ChainLockFromBytes ¶
func ChainLockFromChainID ¶
func (ChainLock) Accounts ¶
func (cl ChainLock) Accounts() []Accountable
type CommitToSibling ¶
func CommitToSiblingFromBytes ¶
func CommitToSiblingFromBytes(data []byte) (*CommitToSibling, error)
func NewCommitToSibling ¶
func NewCommitToSibling(siblingIndex byte, siblingHash []byte) *CommitToSibling
func (*CommitToSibling) Bytes ¶
func (cs *CommitToSibling) Bytes() []byte
func (*CommitToSibling) Name ¶
func (cs *CommitToSibling) Name() string
func (*CommitToSibling) String ¶
func (cs *CommitToSibling) String() string
type ConditionalLock ¶
type ConditionalLock struct { Conditions [4]Constraint Locks [4]Accountable }
ConditionalLock enforces condition by selecting first of up to 4 satisfied conditions and evaluating corresponding accountable lock
func ConditionalLockFromBytes ¶
func ConditionalLockFromBytes(data []byte) (*ConditionalLock, error)
func NewConditionalLock ¶
func NewConditionalLock(conds []Constraint, locks []Accountable) (*ConditionalLock, error)
func (*ConditionalLock) Accounts ¶
func (c *ConditionalLock) Accounts() []Accountable
func (*ConditionalLock) Bytes ¶
func (c *ConditionalLock) Bytes() []byte
func (*ConditionalLock) Name ¶
func (c *ConditionalLock) Name() string
func (*ConditionalLock) String ¶
func (c *ConditionalLock) String() string
type Constraint ¶
func ConstraintFromBytes ¶
func ConstraintFromBytes(data []byte) (Constraint, error)
type DataContext ¶
type DataContext struct {
// contains filtered or unexported fields
}
DataContext is the data structure passed to the eval call. It contains: - tree: all validation context of the transaction, all data which is to be validated - path: a path in the validation context of the constraint being validated in the eval call
func NewDataContext ¶
func NewDataContext(tree *lazybytes.Tree) *DataContext
func (*DataContext) DataTree ¶
func (c *DataContext) DataTree() *lazybytes.Tree
func (*DataContext) Path ¶
func (c *DataContext) Path() lazybytes.TreePath
func (*DataContext) SetPath ¶
func (c *DataContext) SetPath(path lazybytes.TreePath)
type DeadlineLock ¶
type DeadlineLock struct { Deadline Slot ConstraintMain Accountable ConstraintExpiry Accountable }
func DeadlineLockFromBytes ¶
func DeadlineLockFromBytes(data []byte) (*DeadlineLock, error)
func NewDeadlineLock ¶
func NewDeadlineLock(deadline Slot, main, expiry Accountable) *DeadlineLock
func (*DeadlineLock) Accounts ¶
func (dl *DeadlineLock) Accounts() []Accountable
func (*DeadlineLock) Bytes ¶
func (dl *DeadlineLock) Bytes() []byte
func (*DeadlineLock) Name ¶
func (dl *DeadlineLock) Name() string
func (*DeadlineLock) String ¶
func (dl *DeadlineLock) String() string
type GeneralScript ¶
type GeneralScript []byte
func NewGeneralScript ¶
func NewGeneralScript(data []byte) GeneralScript
func NewGeneralScriptFromSource ¶
func NewGeneralScriptFromSource(src string) (GeneralScript, error)
func (GeneralScript) Bytes ¶
func (u GeneralScript) Bytes() []byte
func (GeneralScript) Name ¶
func (u GeneralScript) Name() string
func (GeneralScript) String ¶
func (u GeneralScript) String() string
type IdentityData ¶
type IdentityData struct { // arbitrary string up 255 bytes Description string // genesis time unix seconds GenesisTimeUnix uint32 // initial supply of tokens InitialSupply uint64 // ED25519 public key of the controller GenesisControllerPublicKey ed25519.PublicKey // time tick duration in nanoseconds TickDuration time.Duration // ----------- begin inflation-related // BranchInflationBonusBase inflation bonus BranchInflationBonusBase uint64 // ChainInflationPerTickBase is maximum total inflation per one tick. It is fixed amount for the ledger // It is equal to the inflation which generates the whole supply per one tick ChainInflationPerTickBase uint64 // TicksPerInflationEpoch usually equal to 1 standard year with 365 days TicksPerInflationEpoch uint64 // ChainInflationOpportunitySlots maximum gap between chain outputs for the non-zero inflation ChainInflationOpportunitySlots uint64 // ----------- end inflation-related // VBCost VBCost uint64 // number of ticks between non-sequencer transactions TransactionPace byte // number of ticks between sequencer transactions TransactionPaceSequencer byte // this limits number of sequencers in the network. Reasonable amount would be few hundreds of sequencers MinimumAmountOnSequencer uint64 // limit maximum number of endorsements. For determinism MaxNumberOfEndorsements uint64 // PreBranchConsolidationTicks enforces endorsement-only constraint for specified amount of ticks // before the slot boundary. It means, sequencer transaction can have only one input, its own predecessor // for any transaction with timestamp ticks > MaxTickValueInSlot - PreBranchConsolidationTicks // value 0 of PreBranchConsolidationTicks effectively means no constraint PreBranchConsolidationTicks uint8 PostBranchConsolidationTicks uint8 }
IdentityData is provided at genesis and will remain immutable during lifetime All integers are serialized as big-endian
func DefaultIdentityData ¶
func DefaultIdentityData(privateKey ed25519.PrivateKey) *IdentityData
func GetTestingIdentityData ¶
func GetTestingIdentityData(seed ...int) (*IdentityData, ed25519.PrivateKey)
func IdentityDataFromBytes ¶
func IdentityDataFromBytes(data []byte) (*IdentityData, error)
func MustIdentityDataFromBytes ¶
func MustIdentityDataFromBytes(data []byte) *IdentityData
func StateIdentityDataFromYAML ¶
func StateIdentityDataFromYAML(yamlData []byte) (*IdentityData, error)
func (*IdentityData) Bytes ¶
func (id *IdentityData) Bytes() []byte
func (*IdentityData) EnsurePostBranchConsolidationConstraintTimestamp ¶
func (id *IdentityData) EnsurePostBranchConsolidationConstraintTimestamp(ts Time) Time
func (*IdentityData) GenesisControlledAddress ¶
func (id *IdentityData) GenesisControlledAddress() AddressED25519
func (*IdentityData) GenesisTime ¶
func (id *IdentityData) GenesisTime() time.Time
func (*IdentityData) GenesisTimeUnixNano ¶
func (id *IdentityData) GenesisTimeUnixNano() int64
func (*IdentityData) Hash ¶
func (id *IdentityData) Hash() [32]byte
func (*IdentityData) IsPostBranchConsolidationTimestamp ¶
func (id *IdentityData) IsPostBranchConsolidationTimestamp(ts Time) bool
func (*IdentityData) IsPreBranchConsolidationTimestamp ¶
func (id *IdentityData) IsPreBranchConsolidationTimestamp(ts Time) bool
func (*IdentityData) LedgerTimeFromClockTime ¶
func (id *IdentityData) LedgerTimeFromClockTime(nowis time.Time) Time
func (*IdentityData) OriginChainID ¶
func (id *IdentityData) OriginChainID() ChainID
func (*IdentityData) SetTickDuration ¶
func (id *IdentityData) SetTickDuration(d time.Duration)
func (*IdentityData) SlotDuration ¶
func (id *IdentityData) SlotDuration() time.Duration
func (*IdentityData) SlotsPerDay ¶
func (id *IdentityData) SlotsPerDay() int
func (*IdentityData) SlotsPerYear ¶
func (id *IdentityData) SlotsPerYear() int
func (*IdentityData) String ¶
func (id *IdentityData) String() string
func (*IdentityData) TicksPerYear ¶
func (id *IdentityData) TicksPerYear() int
func (*IdentityData) TimeConstantsToString ¶
func (id *IdentityData) TimeConstantsToString() string
func (*IdentityData) TimeToTicksSinceGenesis ¶
func (id *IdentityData) TimeToTicksSinceGenesis(nowis time.Time) int64
TimeToTicksSinceGenesis converts time value into ticks since genesis
func (*IdentityData) YAML ¶
func (id *IdentityData) YAML() []byte
func (*IdentityData) YAMLAble ¶
func (id *IdentityData) YAMLAble() *IdentityDataYAMLAble
type IdentityDataYAMLAble ¶
type IdentityDataYAMLAble struct { GenesisTimeUnix uint32 `yaml:"genesis_time_unix"` InitialSupply uint64 `yaml:"initial_supply"` GenesisControllerPublicKey string `yaml:"genesis_controller_public_key"` TimeTickDurationNanosec int64 `yaml:"time_tick_duration_nanosec"` VBCost uint64 `yaml:"vb_cost"` TransactionPace byte `yaml:"transaction_pace"` TransactionPaceSequencer byte `yaml:"transaction_pace_sequencer"` BranchInflationBonusBase uint64 `yaml:"branch_inflation_bonus_base"` ChainInflationPerTickBase uint64 `yaml:"chain_inflation_per_tick_base"` ChainInflationOpportunitySlots uint64 `yaml:"chain_inflation_opportunity_slots"` TicksPerInflationEpoch uint64 `yaml:"ticks_per_inflation_epoch"` MinimumAmountOnSequencer uint64 `yaml:"minimum_amount_on_sequencer"` MaxNumberOfEndorsements uint64 `yaml:"max_number_of_endorsements"` PreBranchConsolidationTicks uint8 `yaml:"pre_branch_consolidation_ticks"` PostBranchConsolidationTicks uint8 `yaml:"post_branch_consolidation_ticks"` Description string `yaml:"description"` // non-persistent, for control GenesisControllerAddress string `yaml:"genesis_controller_address"` BootstrapChainID string `yaml:"bootstrap_chain_id"` }
IdentityDataYAMLAble structure for canonical YAMLAble marshaling
func (*IdentityDataYAMLAble) YAML ¶
func (id *IdentityDataYAMLAble) YAML() []byte
type InflationConstraint ¶
type InflationConstraint struct { // ChainInflation inflation amount calculated according to chain inflation rule. It is used inside slot and delayed on slot boundary // and can be added to the inflation of the next transaction in the chain ChainInflation uint64 // VRFProof VRF randomness proof, used to proof VRF and calculate inflation amount on branch // nil for non-branch transactions VRFProof []byte // ChainConstraintIndex must point to the sibling chain constraint ChainConstraintIndex byte // DelayedInflationIndex // Used only if branch successor to enforce correct ChainInflation which will sum of delayed inflation and current inflation // If not used, must be 0xff DelayedInflationIndex byte }
func InflationConstraintFromBytes ¶
func InflationConstraintFromBytes(data []byte) (*InflationConstraint, error)
func (*InflationConstraint) Bytes ¶
func (i *InflationConstraint) Bytes() []byte
func (*InflationConstraint) InflationAmount ¶
func (i *InflationConstraint) InflationAmount(slotBoundary bool) uint64
InflationAmount calculates inflation amount either inside slot, or on the slot boundary
func (*InflationConstraint) Name ¶
func (i *InflationConstraint) Name() string
func (*InflationConstraint) String ¶
func (i *InflationConstraint) String() string
type Library ¶
type Library struct { *easyfl.Library ID *IdentityData // contains filtered or unexported fields }
func InitLocally ¶
func InitLocally(id *IdentityData, verbose ...bool) *Library
func (*Library) BranchInflationBonusFromRandomnessProof ¶
BranchInflationBonusFromRandomnessProof makes uint64 in the range from 0 to BranchInflationBonusBase (incl)
func (*Library) CalcChainInflationAmount ¶
CalcChainInflationAmount interprets EasyFl formula. Return chain inflation amount for given in and out ledger times, input amount of tokens and delayed
func (*Library) CompileLocalLibrary ¶
CompileLocalLibrary compiles local library and serializes it as lazy array
func (*Library) Const ¶
func (lib *Library) Const() LibraryConst
func (*Library) InsideInflationOpportunityWindow ¶
InsideInflationOpportunityWindow returns if ticks and amount are inside inflation opportunity window Outside inflation opportunity window mean 0 inflation
func (*Library) UpperSupplyBound ¶
type LibraryConst ¶
type LibraryConst struct {
*Library
}
func (LibraryConst) MinimumAmountOnSequencer ¶
func (lib LibraryConst) MinimumAmountOnSequencer() uint64
func (LibraryConst) TicksPerInflationEpoch ¶
func (lib LibraryConst) TicksPerInflationEpoch() uint64
func (LibraryConst) TicksPerSlot ¶
func (lib LibraryConst) TicksPerSlot() byte
type LockBalance ¶
type LockBalance struct { // Lock of the output Lock Lock // Balance amount of tokens on the output Balance uint64 // ChainOrigin true if start a chain on this output by adding chain constrain (origin) // false for simple ED25519 account balance (no chain origin added) ChainOrigin bool }
LockBalance is an amount/target pair used in distribution list One LockBalance results in one produced output on the transaction
type MilestoneData ¶
type MilestoneData struct { Name string // < 256 MinimumFee uint64 ChainHeight uint32 BranchHeight uint32 }
MilestoneData data which is on sequencer as 'or(..)' constraint. It is not enforced by the ledger, yet maintained by the sequencer
func MilestoneDataFromConstraint ¶
func MilestoneDataFromConstraint(constr []byte) (*MilestoneData, error)
func ParseMilestoneData ¶
func ParseMilestoneData(o *Output) *MilestoneData
ParseMilestoneData expected at index 4, otherwise nil
func (*MilestoneData) AsConstraint ¶
func (od *MilestoneData) AsConstraint() Constraint
type Output ¶
type Output struct {
// contains filtered or unexported fields
}
func OutputBasic ¶
func OutputFromBytesReadOnly ¶
func (*Output) AccountIDs ¶
func (*Output) ChainConstraint ¶
func (o *Output) ChainConstraint() (*ChainConstraint, byte)
ChainConstraint finds and parses chain constraint. Returns its constraintIndex or 0xff if not found
func (*Output) Clone ¶
Clone clones output and makes it read-only. Optional function overrideReadOnly gives a chance to modify the output before it is locked for modification
func (*Output) ConstraintAt ¶
func (*Output) ConstraintsRawBytes ¶
func (*Output) ForEachConstraint ¶
func (*Output) InflationConstraint ¶
func (o *Output) InflationConstraint() (*InflationConstraint, byte)
InflationConstraint finds and parses inflation constraint. Returns its constraintIndex or 0xff if not found
func (*Output) MustHaveConstraintAnyOfAt ¶
func (*Output) MustStemLock ¶
func (*Output) MustValidOutput ¶
func (o *Output) MustValidOutput()
MustValidOutput checks if amount and lock constraints are as expected
func (*Output) NumConstraints ¶
func (*Output) PushConstraint ¶
PushConstraint can only be used inside r/o override closure
func (*Output) PutConstraint ¶
PutConstraint can only be used inside r/o override closure
func (*Output) SenderED25519 ¶
func (o *Output) SenderED25519() (AddressED25519, byte)
SenderED25519 return sender address and constraintIndex if found, otherwise nil, 0xff
func (*Output) SequencerOutputData ¶
func (o *Output) SequencerOutputData() (*SequencerOutputData, bool)
func (*Output) WithAmount ¶
WithAmount can only be used inside r/o override closure
type OutputDataWithChainID ¶
type OutputDataWithChainID struct { OutputDataWithID ChainID ChainID }
type OutputDataWithID ¶
func (*OutputDataWithID) MustParse ¶
func (o *OutputDataWithID) MustParse() *OutputWithID
func (*OutputDataWithID) Parse ¶
func (o *OutputDataWithID) Parse(validOpt ...func(o *Output) error) (*OutputWithID, error)
func (*OutputDataWithID) ParseAsChainOutput ¶
func (o *OutputDataWithID) ParseAsChainOutput() (*OutputWithChainID, byte, error)
ParseAsChainOutput parses raw output data expecting chain output. Returns parsed output and index of the chain constraint in it
type OutputID ¶
type OutputID [OutputIDLength]byte
func GenesisOutputID ¶
func GenesisOutputID() (ret OutputID)
GenesisOutputID independent on ledger constants, except GenesisOutputIndex which is byte(0)
func GenesisStemOutputID ¶
func GenesisStemOutputID() (ret OutputID)
GenesisStemOutputID independent on ledger constants, except GenesisStemOutputIndex which is byte(1)
func NewOutputID ¶
func NewOutputID(id *TransactionID, idx byte) (ret OutputID)
func OutputIDFromBytes ¶
func OutputIDFromHexString ¶
func (*OutputID) IsBranchTransaction ¶
func (*OutputID) IsSequencerTransaction ¶
func (*OutputID) StringShort ¶
func (*OutputID) StringVeryShort ¶
func (*OutputID) TransactionHash ¶
func (oid *OutputID) TransactionHash() (ret TransactionIDShort)
func (*OutputID) TransactionID ¶
func (oid *OutputID) TransactionID() (ret TransactionID)
type OutputWithChainID ¶
type OutputWithChainID struct { OutputWithID ChainID ChainID PredecessorConstraintIndex byte }
func GenesisOutput ¶
func GenesisOutput(initialSupply uint64, controllerAddress AddressED25519) *OutputWithChainID
type OutputWithID ¶
func GenesisStemOutput ¶
func GenesisStemOutput() *OutputWithID
func (*OutputWithID) AsChainOutput ¶
func (o *OutputWithID) AsChainOutput() (*OutputWithChainID, error)
func (*OutputWithID) Clone ¶
func (o *OutputWithID) Clone() *OutputWithID
func (*OutputWithID) ExtractChainID ¶
func (o *OutputWithID) ExtractChainID() (ChainID, byte, bool)
ExtractChainID return chainID, predecessor constraint index, existence flag
func (*OutputWithID) IDShort ¶
func (o *OutputWithID) IDShort() string
func (*OutputWithID) MustAsChainOutput ¶
func (o *OutputWithID) MustAsChainOutput() *OutputWithChainID
func (*OutputWithID) Short ¶
func (o *OutputWithID) Short() string
func (*OutputWithID) String ¶
func (o *OutputWithID) String() string
func (*OutputWithID) Timestamp ¶
func (o *OutputWithID) Timestamp() Time
type Parser ¶
type Parser func([]byte) (Constraint, error)
type RoyaltiesED25519 ¶
type RoyaltiesED25519 struct { Address AddressED25519 Amount uint64 }
func NewRoyalties ¶
func NewRoyalties(addr AddressED25519, amount uint64) *RoyaltiesED25519
func RoyaltiesED25519FromBytes ¶
func RoyaltiesED25519FromBytes(data []byte) (*RoyaltiesED25519, error)
func (*RoyaltiesED25519) Bytes ¶
func (cl *RoyaltiesED25519) Bytes() []byte
func (*RoyaltiesED25519) Name ¶
func (cl *RoyaltiesED25519) Name() string
func (RoyaltiesED25519) String ¶
func (cl RoyaltiesED25519) String() string
type SenderED25519 ¶
type SenderED25519 struct {
Address AddressED25519
}
func NewSenderED25519 ¶
func NewSenderED25519(addr AddressED25519) *SenderED25519
func SenderED25519FromBytes ¶
func SenderED25519FromBytes(data []byte) (*SenderED25519, error)
func (*SenderED25519) Bytes ¶
func (s *SenderED25519) Bytes() []byte
func (*SenderED25519) Name ¶
func (s *SenderED25519) Name() string
func (*SenderED25519) String ¶
func (s *SenderED25519) String() string
type SequencerConstraint ¶
type SequencerConstraint struct { // must point to the sibling chain constraint ChainConstraintIndex byte // must be equal to the total produced amount of the transaction TotalProducedAmount uint64 }
func NewSequencerConstraint ¶
func NewSequencerConstraint(chainConstraintIndex byte, totalProducedAmount uint64) *SequencerConstraint
func SequencerConstraintFromBytes ¶
func SequencerConstraintFromBytes(data []byte) (*SequencerConstraint, error)
func (*SequencerConstraint) Bytes ¶
func (s *SequencerConstraint) Bytes() []byte
func (*SequencerConstraint) Name ¶
func (s *SequencerConstraint) Name() string
func (*SequencerConstraint) String ¶
func (s *SequencerConstraint) String() string
type SequencerOutputData ¶
type SequencerOutputData struct { SequencerConstraint *SequencerConstraint ChainConstraint *ChainConstraint AmountOnChain uint64 SequencerConstraintIndex byte MilestoneData *MilestoneData }
type Slot ¶
type Slot uint32
Slot represents a particular time slot. Starting slot 0 at genesis
func SlotFromBytes ¶
SlotFromBytes enforces 2 most significant bits of the first byte are 0
func (Slot) TransactionIDPrefixes ¶
type StemLock ¶
type StemLock struct {
PredecessorOutputID OutputID
}
func StemLockFromBytes ¶
func (*StemLock) Accounts ¶
func (st *StemLock) Accounts() []Accountable
type Time ¶
type Time [TimeByteLength]byte
Time (ledger time) is 5 bytes: - bytes [0:3] is slot (big endian). Most significant of the byte 0 in the slot must be 0 - byte 4 is tick
var (
NilLedgerTime Time
)
func MaximumTime ¶
func NewLedgerTime ¶
func TimeFromBytes ¶
func TimeFromClockTime ¶
func TimeFromTicksSinceGenesis ¶
TimeFromTicksSinceGenesis converts absolute value of ticks since genesis into the time value
func (Time) AfterOrEqual ¶
func (Time) AsFileName ¶
func (Time) BeforeOrEqual ¶
func (Time) IsSlotBoundary ¶
func (Time) NextSlotBoundary ¶
func (Time) TicksSinceGenesis ¶
func (Time) TicksToNextSlotBoundary ¶
type TotalAmount ¶
type TotalAmount uint64
func NewTotalAmount ¶
func NewTotalAmount(a uint64) TotalAmount
func TotalAmountFromBytes ¶
func TotalAmountFromBytes(data []byte) (TotalAmount, error)
func (TotalAmount) Amount ¶
func (a TotalAmount) Amount() uint64
func (TotalAmount) Bytes ¶
func (a TotalAmount) Bytes() []byte
func (TotalAmount) Name ¶
func (a TotalAmount) Name() string
func (TotalAmount) String ¶
func (a TotalAmount) String() string
type TransactionID ¶
type TransactionID [TransactionIDLength]byte
TransactionID : [0:5] - timestamp bytes [5:32] TransactionIDShort
func GenesisTransactionID ¶
func GenesisTransactionID() *TransactionID
GenesisTransactionID independent on any ledger constants
func NewTransactionID ¶
func NewTransactionID(ts Time, h TransactionIDShort, sequencerTxFlag bool) (ret TransactionID)
func RandomTransactionID ¶
func RandomTransactionID(sequencerFlag bool) TransactionID
RandomTransactionID not completely random. For testing
func TransactionIDFromBytes ¶
func TransactionIDFromBytes(data []byte) (ret TransactionID, err error)
func TransactionIDFromHexString ¶
func TransactionIDFromHexString(str string) (ret TransactionID, err error)
func (*TransactionID) AsFileName ¶
func (txid *TransactionID) AsFileName() string
func (*TransactionID) Bytes ¶
func (txid *TransactionID) Bytes() []byte
func (*TransactionID) IsBranchTransaction ¶
func (txid *TransactionID) IsBranchTransaction() bool
func (*TransactionID) IsSequencerMilestone ¶
func (txid *TransactionID) IsSequencerMilestone() bool
func (*TransactionID) MarshalJSON ¶
func (txid *TransactionID) MarshalJSON() ([]byte, error)
func (*TransactionID) ShortID ¶
func (txid *TransactionID) ShortID() (ret TransactionIDShort)
ShortID return hash part of ID
func (*TransactionID) Slot ¶
func (txid *TransactionID) Slot() Slot
func (*TransactionID) String ¶
func (txid *TransactionID) String() string
func (*TransactionID) StringHex ¶
func (txid *TransactionID) StringHex() string
func (*TransactionID) StringShort ¶
func (txid *TransactionID) StringShort() string
func (*TransactionID) StringVeryShort ¶
func (txid *TransactionID) StringVeryShort() string
func (*TransactionID) Timestamp ¶
func (txid *TransactionID) Timestamp() (ret Time)
func (*TransactionID) UnmarshalJSON ¶
func (txid *TransactionID) UnmarshalJSON(hexStrData []byte) error
func (*TransactionID) VeryShortID4 ¶
func (txid *TransactionID) VeryShortID4() (ret TransactionIDVeryShort4)
VeryShortID4 returns first 8 bytes of the ShortID, i.e. of the hash Collisions cannot be ruled out! Intended use is in Bloom filtering, when false positives are acceptable
func (*TransactionID) VeryShortID8 ¶
func (txid *TransactionID) VeryShortID8() (ret TransactionIDVeryShort8)
VeryShortID8 returns first 8 bytes of the ShortID, i.e. of the hash Collisions cannot be ruled out! Intended use is in Bloom filtering, when false positives are acceptable
type TransactionIDShort ¶
type TransactionIDShort [TransactionIDShortLength]byte
TransactionIDShort is [0:28] of the blake2b 32-byte hash of transaction bytes
func HashTransactionBytes ¶
func HashTransactionBytes(txBytes []byte) (ret TransactionIDShort)
type TransactionIDVeryShort4 ¶
type TransactionIDVeryShort4 [4]byte
TransactionIDVeryShort4 is first 4 bytes of TransactionIDShort. Warning. Collisions cannot be ruled out
type TransactionIDVeryShort8 ¶
type TransactionIDVeryShort8 [8]byte
TransactionIDVeryShort8 is first 8 bytes of TransactionIDShort. Warning. Collisions cannot be ruled out
Source Files ¶
- amount.go
- chain.go
- commit_sibling.go
- commitment.go
- constraints.go
- deposit.go
- general.go
- genesis.go
- id.go
- immutable.go
- inflation.go
- inflation_fun.go
- json.go
- ledgerid.go
- lib_id.go
- lib_singleton.go
- lib_time.go
- lock_chain.go
- lock_conditional.go
- lock_deadline.go
- lock_ed25519.go
- lock_stem.go
- msdata.go
- output.go
- royalties.go
- sender_ed25519.go
- sequencer.go
- timelock.go
- total_amount.go
- upgrade0.go