envelops

package
v0.0.0-...-73b4c3b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 22, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProtocolId = "ord"
)

Variables

This section is empty.

Functions

func Accept

func Accept(instructions *txscript.ScriptTokenizer, instruction []byte) bool

func ParsedEnvelopeFromRaw

func ParsedEnvelopeFromRaw(data Envelope)

Types

type Envelope

type Envelope struct {
	Input       uint32
	Offset      uint32
	TypeDataMap map[int][]byte
	Payload     [][]byte
	Pushnum     bool
	Stutter     bool
}

Envelope content_type, with a tag of 1, whose value is the MIME type of the body. pointer, with a tag of 2, see pointer docs. parent, with a tag of 3, see provenance. TODO metadata, with a tag of 5, see metadata. TODO metaprotocol, with a tag of 7, whose value is the metaprotocol identifier. TODO content_encoding, with a tag of 9, whose value is the encoding of the body. TODO delegate, with a tag of 11, see delegate.

func FromInstructions

func FromInstructions(instructions *txscript.ScriptTokenizer, input int, offset int, stutter bool) (bool, *Envelope)

func FromTapScript

func FromTapScript(tapScript []byte, input int) ([]Envelope, error)

func FromTransaction

func FromTransaction(transaction *wire.MsgTx) []Envelope

func (*Envelope) GetContent

func (e *Envelope) GetContent() []byte

func (*Envelope) GetContentEncoding

func (e *Envelope) GetContentEncoding() string

func (*Envelope) GetContentType

func (e *Envelope) GetContentType() string

func (*Envelope) GetDelegate

func (e *Envelope) GetDelegate() string

func (*Envelope) GetPointer

func (e *Envelope) GetPointer() uint64

GetPointer Pointer

func (*Envelope) GetProvenance

func (e *Envelope) GetProvenance() string

GetProvenance is parent little-endian OP_PUSH 3 TXID INDEX TXID = 32-byte INDEX = 4-byte

func (*Envelope) GetRune

func (e *Envelope) GetRune() string

type Inscription

type Inscription struct {
	Body                  []byte
	ContentEncoding       []byte
	ContentType           []byte
	Delegate              []byte
	DuplicateField        bool
	IncompleteField       bool
	Metadata              []byte
	MetaProtocol          []byte
	Parent                []byte
	Pointer               []byte
	UnRecognizedEvenField bool
}

type ParsedEnvelope

type ParsedEnvelope struct {
	Input   uint32
	Offset  uint32
	Payload Inscription
	Pushnum bool
	Stutter bool
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL