Documentation ¶
Overview ¶
Package run is for parsing run jigs
Index ¶
Constants ¶
const Prefix string = "run"
Prefix is the run protocol prefix found in the 1st pushdata
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Jig ¶
type Jig struct { AppID string Version uint64 Payload Payload // not sure what data format is actually best for this }
Jig is a RunOnBitcoin object
func NewFromTape ¶
NewFromTape will create a new AIP object from a bob.Tape
func NewFromUtxo ¶
NewFromUtxo returns a Jig from a bt.Output
type Payload ¶
type Payload struct { In uint64 `json:"in"` Ref []string `json:"ref"` Out []string `json:"out"` Del []string `json:"del"` Cre []interface{} `json:"cre"` Exec []Statement `json:"exec"` }
Payload contains the following run metadata: in Number of jig and code inputs ref Array of references to jigs and code used by not spent out State hashes of jigs and code in transaction outputs del State hashes of jigs and code deleted cre New owners of jigs and code created exec Statements to execute on the jigs
type Statement ¶
type Statement struct { Op Command Data []interface{} // Depends on command }
Statement is command + data for execution Data depends on the command DEPLOY Upload new code [<src1>, <props1>, <src2>, <props2>, ...] NEW Instantiate a jig [<jig class>, <args>] CALL Call a method on a jig [<jig>, <method>, <args>] UPGRADE Replace code with new code [<code>, <src>, <props>]