Versions in this module Expand all Collapse all v1 v1.1.3 Jul 24, 2020 Changes in this version + const DefaultPkScriptVersion + const DefaultTxVersion + const NoExpiryValue + const OP_RETURN + const PropertyID_ENTCASH + const PropertyID_LEEK + const PropertyID_Omni + const PropertyID_YAX + const SigHashAll + const TxSerializeFull + const TxSerializeNoWitness + const TxSerializeOnlyWitness + const TxSerializeWitnessSigning + const TxSerializeWitnessValueSigning + const TxTreeRegular + const TxTreeStake + var BitcoinAlphabet = NewAlphabet("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz") + var CurveOrder = []byte + var ErrorInvalidBase58String = errors.New("invalid base58 string") + var HalfCurveOrder = []byte + var PKHAddressPrefix = []byte + func CreateEmptyTransactionAndHash(ins []Vin, outs []Vout, locktime, expiry uint32) (string, []string, error) + func CreateOmniEmptyTransactionAndHash(ins []Vin, to, change *Vout, amount uint64, propertyID uint32, ...) (string, []string, error) + func Decode(input string, alphabet *Alphabet) ([]byte, error) + func DecodeCheck(address string) ([]byte, []byte, error) + func Encode(input []byte, alphabet *Alphabet) string + func EncodeCheck(prefix []byte, hash []byte) string + func SignTransaction(hashStr string, prikey []byte) ([]byte, error) + func VerifyAndCombineTransaction(emptyTrans string, sigPub []*SigPub) (bool, string) + type Alphabet struct + func NewAlphabet(alphabet string) *Alphabet + func (alphabet Alphabet) String() string + type SigPub struct + Address string + PublicKey []byte + Signature []byte + type TxIn struct + LockScript []byte + Sequence []byte + SignatureScript []byte + TxID []byte + TxTree byte + Vout []byte + func (in *TxIn) ToBytes() []byte + type TxOut struct + Amount []byte + PKScript []byte + PkScriptVersion []byte + func (out *TxOut) ToBytes() []byte + type TxStruct struct + Expiry []byte + LockTime []byte + SerType []byte + TxIns []*TxIn + TxOuts []*TxOut + TxVersion []byte + func NewTxStruct(ins []Vin, outs []Vout, locktime, expiry uint32) (*TxStruct, error) + func (tx *TxStruct) GetHash(index uint64) ([]byte, error) + func (tx *TxStruct) ToBytes(index uint64, serType uint16) ([]byte, error) + type Vin struct + Amount uint64 + BlockHeight uint32 + BlockIndex uint32 + LockScript string + Tree byte + TxID string + Vout uint32 + func GetVinList(emptyTrans string) ([]Vin, error) + func (in Vin) NewTxIn() (*TxIn, error) + type Vout struct + Address string + Amount uint64 + PkScriptVersion uint16 + func (out Vout) NewTxOut() (*TxOut, error)