Versions in this module Expand all Collapse all v1 v1.0.0 Nov 4, 2024 Changes in this version + const COMMIT_CONFIRMATIONS + const MAGIC_NUMBER + const MaxDivisibility + const MaxSpacers + const SUBSIDY_HALVING_INTERVAL + var ErrBlock = func(err string) error + var ErrCharacter = func(c rune) error + var ErrDoubleSpacer = errors.New("double spacer") + var ErrLeadingSpacer = errors.New("leading spacer") + var ErrNone = errors.New("none") + var ErrSeparator = errors.New("missing separator") + var ErrTrailingSpacer = errors.New("trailing spacer") + var ErrTransaction = func(err string) error + var RESERVED = Uint128FromString("6402364363415443603228541259936211926") + var STEPS = []uint128.Uint128 + func Decode(encoded []byte) *big.Int + func Encode(n *big.Int) []byte + func EncodeChar(r rune) []byte + func EncodeUint128(n uint128.Uint128) []byte + func EncodeUint32(n uint32) []byte + func EncodeUint64(n uint64) []byte + func EncodeUint8(n uint8) []byte + func FirstRuneHeight(network wire.BitcoinNet) uint32 + func TagTake[T any](t Tag, fields map[Tag][]uint128.Uint128, ...) (*T, error) + func Uint128FromString(s string) uint128.Uint128 + type Artifact struct + Cenotaph *Cenotaph + Runestone *Runestone + func (a *Artifact) Mint() *RuneId + type Cenotaph struct + Etching *Rune + Flaw *Flaw + Mint *RuneId + type Edict struct + Amount uint128.Uint128 + ID RuneId + Output uint32 + func EdictFromIntegers(tx *wire.MsgTx, id RuneId, amount uint128.Uint128, output uint128.Uint128) (*Edict, error) + type Error struct + Character rune + Range bool + func (e Error) Error() string + type Etching struct + Divisibility *uint8 + Premine *uint128.Uint128 + Rune *Rune + Spacers *uint32 + Symbol *rune + Terms *Terms + Turbo bool + func (e *Etching) Supply() *uint128.Uint128 + type Flag uint8 + const FlagCenotaph + const FlagEtching + const FlagTerms + const FlagTurbo + func (f Flag) Mask() uint128.Uint128 + func (f Flag) Set(flags *uint128.Uint128) + func (f Flag) Take(flags *uint128.Uint128) bool + type Flaw int + const EdictOutput + const EdictRuneId + const InvalidScript + const Opcode + const SupplyOverflow + const TrailingIntegers + const TruncatedField + const UnrecognizedEvenTag + const UnrecognizedFlag + const Varint + func FlawP(f Flaw) *Flaw + func NewFlaw(s string) Flaw + func (f Flaw) Error() error + func (f Flaw) String() string + type Message struct + Edicts []Edict + Fields map[Tag][]uint128.Uint128 + Flaw *Flaw + func MessageFromIntegers(tx *wire.MsgTx, payload []uint128.Uint128) (*Message, error) + type Payload struct + Invalid Flaw + Valid []byte + type Rune struct + Value uint128.Uint128 + func MinimumAtHeight(chain wire.BitcoinNet, height uint64) Rune + func NewRune(value uint128.Uint128) Rune + func Reserved(block uint64, tx uint32) Rune + func RuneFromString(s string) (*Rune, error) + func (r Rune) Commitment() []byte + func (r Rune) IsReserved() bool + func (r Rune) MarshalJSON() ([]byte, error) + func (r Rune) N() uint128.Uint128 + func (r Rune) String() string + type RuneId struct + Block uint64 + Tx uint32 + func NewRuneId(block uint64, tx uint32) (*RuneId, error) + func RuneIdFromString(s string) (*RuneId, error) + func (r RuneId) Cmp(other RuneId) int + func (r RuneId) Delta(next RuneId) (uint64, uint32, error) + func (r RuneId) Next(block uint128.Uint128, tx uint128.Uint128) (*RuneId, error) + func (r RuneId) String() string + type Runestone struct + Edicts []Edict + Etching *Etching + Mint *RuneId + Pointer *uint32 + func (r *Runestone) Decipher(transaction *wire.MsgTx) (*Artifact, error) + func (r *Runestone) Encipher() ([]byte, error) + type SpacedRune struct + Rune Rune + Spacers uint32 + func NewSpacedRune(r Rune, spacers uint32) *SpacedRune + func SpacedRuneFromString(s string) (*SpacedRune, error) + func (sr *SpacedRune) String() string + type Tag uint8 + const TagAmount + const TagBody + const TagCap + const TagCenotaph + const TagDivisibility + const TagFlags + const TagHeightEnd + const TagHeightStart + const TagMint + const TagNop + const TagOffsetEnd + const TagOffsetStart + const TagPointer + const TagPremine + const TagRune + const TagSpacers + const TagSymbol + func NewTag(u uint128.Uint128) Tag + func (t Tag) Encode(values []uint128.Uint128, payload *[]byte) + func (tag Tag) Byte() byte + func (tag Tag) String() string + type Terms struct + Amount *uint128.Uint128 + Cap *uint128.Uint128 + Height [2]*uint64 + Offset [2]*uint64