Documentation ¶
Index ¶
- Constants
- Variables
- func CheckChainFlag(chainFlag string) bool
- func DecodeMetaOutScript(scriptPubKey string, txId string) ([]string, bool, error)
- func DecodeMetaOutScriptForMetaFile(script, encoding string) ([]string, bool, error)
- func GetMetaBlockEndBlockHeight(metaBlockHeight int64) int64
- func GetMetaBlockStartBlockHeight(metaBlockHeight int64) int64
- func GetStartBlockHeightAndEndBlockHeight(metaBlockHeight int64) (int64, int64)
- func IsChainFlag(opStr string) (bool, string)
- func MakeMetaBlockHeight(blockHeight int64) int64
- func MakeMetanetId(nodePubKey string, nodeParentTxId string) string
- func MakeNodeId(nodePubKey string, nodeTxId string) string
- type DataPart
- type ScriptType
Constants ¶
View Source
const ( TextPlain = "text/plain" ImageUrl = "image/url" ImageJpg = "image/jpg" ImageGif = "image/gif" AudioWav = "audio/wav" Transaction = "transaction" BsvProtocol = "bsvProtocol" )
View Source
const ( Op0 = 0x00 OpReturn = 0x6A )
View Source
const ( Op0Str = "OP_0" OpReturnStr = "OP_RETURN" )
View Source
const ( TypeEmpty = iota TypeP2PK TypeP2PKH TypeOpreturn TypeNotStandard )
View Source
const ( OpCodeHash160 = byte(0xA9) OpCodeEqual = byte(0x87) OpCodeEqualVerify = byte(0x88) OpCodeCheckSig = byte(0xAC) OpCodeDup = byte(0x76) OpCode_0 = byte(0x00) OpCode_1 = byte(0x51) OpCheckMultiSig = byte(0xAE) OpPushData1 = byte(0x4C) OpPushData2 = byte(0x4D) OpPushData3 = byte(0x4E) )
View Source
const ( OpCodeHash160_Str = "OP_HASH160" OpCodeEqual_Str = "OP_EQUAL" OpCodeEqualVerify_Str = "OP_EQUALVERIFY" OpCodeCheckSig_Str = "OP_CHECKSIG" OpCodeDup_Str = "OP_DUP" OpCode_0_Str = "0" OpCode_1_Str = "1" OpCheckMultiSig_Str = "OP_CHECKMULTISIG" OpPushData1_Str = "OP_PUSHDATA1" OpPushData2_Str = "OP_PUSHDATA2" OpPushData3_Str = "OP_PUSHDATA3" OpReturn_Str = "OP_RETURN" )
Variables ¶
Functions ¶
func CheckChainFlag ¶ added in v0.0.3
func DecodeMetaOutScript ¶
DecodeMetaOutScript :
Used to parse script data in Outputs for parser data
return:
PartsString - []string - The parts of script IsMeta - bool - Whether Meta Error - error - The message of error
func DecodeMetaOutScriptForMetaFile ¶
for metafile
func IsChainFlag ¶
func MakeMetaBlockHeight ¶
Types ¶
type DataPart ¶
type DataPart struct { ChainTag string `json:"chainTag"` TxId string `json:"txID"` MetanetId string `json:"metanetId"` NodePublicKey string `json:"nodePublicKey"` //NodePublicKey / NodeAddress NodeParentTxId string `json:"nodeParentTxId"` NodeParentChainFlag string `json:"nodeParentChainFlag"` MetaIdTag string `json:"metaIdTag"` NodeName string `json:"nodeName"` Data interface{} `json:"data"` DataString string `json:"dataString"` //data raw string Encrypt string `json:"encrypt"` Version string `json:"version"` DataType string `json:"dataType"` Encoding string `json:"encoding"` Params []string `json:"params"` //extra params }
func ChainDataToDataPart ¶
type ScriptType ¶
type ScriptType int64
func DecodeCommonOutScript ¶
type p2pk|p2pkh describe parts error
func DecodeNormalOutScript ¶
func DecodeNormalOutScript(scriptPubKey string) (ScriptType, string, error)
type p2pk|p2pkh describe parts error
Click to show internal directories.
Click to hide internal directories.