Documentation ¶
Index ¶
- Constants
- func ArbitraryData(data []byte) ([]byte, error)
- func FuncOP_CHECKSIG(s *Stack, data *Data) error
- func FuncOP_CHECKSIGVERIFY(s *Stack, data *Data) error
- func FuncOP_DUP(s *Stack) error
- func FuncOP_EQUAL(s *Stack) error
- func FuncOP_EQUALVERIFY(s *Stack) error
- func FuncOP_HASH160(s *Stack) error
- func FuncOP_VERIFY(s *Stack) error
- func LastSplit(script []byte, opCode byte) []byte
- func ParseScript(script []byte) string
- func ParseStandard(s []byte) []byte
- func PayToPubKeyHash(hash []byte) ([]byte, error)
- func RIPEMD160Hash(data []byte) []byte
- func SigScriptEncode(sig, pubKey []byte) []byte
- func StripOpCode(script []byte, opCode byte) []byte
- type Data
- type HashFunc
- type Object
- type OpCode
- type Script
- type Stack
- func (s *Stack) CheckSuccess() bool
- func (s *Stack) Execute(script []byte, data *Data) error
- func (s *Stack) Peek() (Object, error)
- func (s *Stack) Pop() (Object, error)
- func (s *Stack) PopData() ([]byte, error)
- func (s *Stack) Push(o Object)
- func (s *Stack) PushBool(b bool)
- func (s Stack) String() string
Constants ¶
View Source
const ( OP_0 = 0x00 OP_LENGTH_1 = 0x01 OP_LENGTH_MAX = 0x4b OP_VERIFY = 0x69 OP_RETURN = 0x6a OP_DUP = 0x76 OP_XOR = 0x86 OP_EQUAL = 0x87 OP_EQUALVERIFY = 0x88 OP_RIPEMD160 = 0xa6 OP_HASH160 = 0xa9 OP_CODESEPARATOR = 0xab OP_CHECKSIG = 0xac OP_CHECKSIGVERIFY = 0xad )
View Source
const (
StandardPayToPubKeyHash = 1
)
Variables ¶
This section is empty.
Functions ¶
func ArbitraryData ¶
func FuncOP_CHECKSIG ¶
func FuncOP_CHECKSIGVERIFY ¶
func FuncOP_DUP ¶
func FuncOP_EQUAL ¶
func FuncOP_EQUALVERIFY ¶
func FuncOP_HASH160 ¶
func FuncOP_VERIFY ¶
func LastSplit ¶
LastSplit splits the script on every occurance of opCode and returns the last part, not including the opCode.
func ParseScript ¶
func ParseStandard ¶
ParseStandard parses standard payments scripts and returns true and the destination hash if the script is standard.
func PayToPubKeyHash ¶
func RIPEMD160Hash ¶
func SigScriptEncode ¶
func StripOpCode ¶
StripOpCode will remove all occurences of opCode from the the script.
Types ¶
type Object ¶
type Object struct {
// contains filtered or unexported fields
}
func ParseScriptObject ¶
type Stack ¶
type Stack struct {
// contains filtered or unexported fields
}
func (*Stack) CheckSuccess ¶
Click to show internal directories.
Click to hide internal directories.