Documentation
¶
Index ¶
- type Action
- type Child
- type Error
- type Event
- type ExecContext
- func (e *ExecContext) Build() (output *bt.Output, err error)
- func (e *ExecContext) Emit(event string, topics [][]byte)
- func (v ExecContext) MarshalEasyJSON(w *jwriter.Writer)
- func (v ExecContext) MarshalJSON() ([]byte, error)
- func (exec *ExecContext) Return(err error)
- func (e *ExecContext) Script() (script *bscript.Script, err error)
- func (e *ExecContext) Spawn(contract *Outpoint, method string, callData []byte)
- func (v *ExecContext) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *ExecContext) UnmarshalJSON(data []byte) error
- type File
- type Instance
- type Outpoint
- type Txo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Child ¶
type Child struct {
Contract *Outpoint `json:"contract"`
Method string `json:"method"`
CallData []byte `json:"callData"`
}
func (Child) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (Child) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*Child) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Child) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
type Error ¶
func (Error) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (Error) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*Error) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Error) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
type Event ¶
func (Event) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (Event) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*Event) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Event) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
type ExecContext ¶
type ExecContext struct {
Action Action `json:"action"`
Contract *Outpoint `json:"contract"`
Method string `json:"method"`
CallData []byte `json:"callData,omitempty"`
Stack []*ExecContext `json:"stack,omitempty"`
Parent int32 `json:"parent"`
Instance *Instance `json:"instance"`
Events []*Event `json:"events,omitempty"`
Children []*Child `json:"children,omitempty"`
}
func Initialize ¶
func Initialize() (exec *ExecContext, err error)
func ParseScript ¶
func ParseScript(script []byte) (exec *ExecContext, err error)
func (*ExecContext) Emit ¶
func (e *ExecContext) Emit(event string, topics [][]byte)
func (ExecContext) MarshalEasyJSON ¶
func (v ExecContext) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (ExecContext) MarshalJSON ¶
func (v ExecContext) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*ExecContext) Return ¶
func (exec *ExecContext) Return(err error)
func (*ExecContext) Spawn ¶
func (e *ExecContext) Spawn(contract *Outpoint, method string, callData []byte)
func (*ExecContext) UnmarshalEasyJSON ¶
func (v *ExecContext) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*ExecContext) UnmarshalJSON ¶
func (v *ExecContext) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type File ¶
type File struct {
Outpoint *Outpoint `json:"outpoint,omitempty"`
Data []byte `json:"data"`
Type string `json:"type,omitempty"`
Encoding string `json:"enc,omitempty"`
Name string `json:"name,omitempty"`
Size uint32 `json:"size,omitempty"`
Hash []byte `json:"hash,omitempty"`
}
func (File) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (File) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*File) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*File) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
type Instance ¶
type Instance struct {
Txo *Txo `json:"txo,omitempty"`
Outpoint *Outpoint `json:"outpoint,omitempty"`
Origin *Outpoint `json:"origin,omitempty"`
Nonce uint64 `json:"nonce,omitempty"`
Kind *Outpoint `json:"kind,omitempty"`
Satoshis uint64 `json:"sats"`
Lock []byte `json:"lock"`
Storage []byte `json:"store,omitempty"`
Code *Outpoint `json:"code"`
Creator *Instance `json:"creator"`
}
func (Instance) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (Instance) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*Instance) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Instance) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
type Outpoint ¶
type Outpoint []byte
func NewOutpoint ¶
func NewOutpointFromBytes ¶
func NewOutpointFromString ¶
type Txo ¶
type Txo struct {
Outpoint *Outpoint `json:"outpoint,omitempty"`
Satoshis uint64 `json:"sats"`
Lock []byte `json:"lock"`
Script *bscript.Script `json:"script"`
}
func (Txo) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (Txo) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*Txo) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Txo) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface