Versions in this module Expand all Collapse all v1 v1.0.8 May 28, 2020 Changes in this version type TXData + func (data *TXData) DecodeString(jsonHex string) error + func (data *TXData) EncodeString() (string, error) v1.0.7 May 26, 2020 Changes in this version + const Precision + func ConvertAddress2pubk(address string) (string, error) + func UtilDataEncoding(data string) string + type DataDetail struct + Data string + UUID string + UnixTime uint32 + func UtilDataDecoding(data string) (DataDetail, error) type RawTransaction + func (rtx RawTransaction) ToTransaction(includeSignData bool) Transaction + type TXBuilder struct + func NewTXBuilder() *TXBuilder + func (b *TXBuilder) AddInput(txid string, vout uint8) *TXBuilder + func (b *TXBuilder) Build() (*RawTransaction, error) + func (b *TXBuilder) SetAddress(add string) *TXBuilder + func (b *TXBuilder) SetAmount(amount float64) *TXBuilder + func (b *TXBuilder) SetAnchor(anchor string) *TXBuilder + func (b *TXBuilder) SetData(data []byte) *TXBuilder + func (b *TXBuilder) SetDataWithUUID(_uuid string, timestamp int64, data string) *TXBuilder + func (b *TXBuilder) SetFee(fee float64) *TXBuilder + func (b *TXBuilder) SetLockUntil(lockUntil int) *TXBuilder + func (b *TXBuilder) SetStringData(data string) *TXBuilder + func (b *TXBuilder) SetTimestamp(timestamp int) *TXBuilder + func (b *TXBuilder) SetVersion(v int) *TXBuilder type Transaction + Data string + Vin []Vin + type Vin struct + Txid string + Vout int v1.0.6 May 25, 2020 v1.0.5 Apr 23, 2020 Changes in this version + type TXData struct + TplHex string + TxHex string + func (data *TXData) FromJSONHex(jsonHex string) error + func (data *TXData) ToJSONHex() (string, error) type TemplateType + func (typ TemplateType) String() string v1.0.4 Apr 23, 2020 v1.0.3 Apr 23, 2020 Changes in this version + const TemplateDataSpliter type RawTransaction + func (rtx *RawTransaction) SignWithPrivateKey(templateDataList, privkHex string) error + type TemplateType int16 + const TemplateTypeDelegate + const TemplateTypeExchange + const TemplateTypeFork + const TemplateTypeMax + const TemplateTypeMin + const TemplateTypeMultisig + const TemplateTypePayment + const TemplateTypeProof + const TemplateTypeVote + const TemplateTypeWeighted + func GetTemplateType(templateData string) TemplateType v1.0.2 Mar 23, 2020 Changes in this version + const PrivkeyHexLen + const PubkeyAddressLen + const PubkeyHexLen + const Uint256HexLen + func Base32Encode(md32 []uint8) string + func CopyReverse(bs []byte) []byte + func CopyReverseThenEncodeHex(bs []byte) string + func CryptoMultiSign(pubks [][]byte, privk []byte, msg []byte, sig []byte) ([]byte, error) + func GetPubKeyAddress(pubk string) (string, error) + func JSONIndent(v interface{}) string + func ParsePrivkHex(privkHex string) (ed25519.PrivateKey, error) + func ParsePublicKeyHex(hexedPubK string) ([]byte, error) + func PrivateKeyHex2Seed(hexedPrivk string) ([]byte, error) + func Seed2pubk(seed []byte) ([]byte, error) + func Seed2pubkString(seed []byte) (string, error) + func Seed2string(seed []byte) string + func UntilError(fns ...func() error) error + type AddrKeyPair struct + Addr string + Privk string + Pubk string + func MakeKeyPair() (AddrKeyPair, error) + type MultisigInfo struct + Hex string + M uint8 + Members []MultisigMember + N uint8 + func ParseMultisigTemplateHex(hexData string) (*MultisigInfo, error) + func (mi MultisigInfo) Pubks() [][]byte + func (mi MultisigInfo) SignTemplatePart() []byte + type MultisigMember struct + Pub []byte + Weight uint8 + type MultisigTXData struct + TplHex string + TxHex string + func (data *MultisigTXData) FromJSONHex(jsonHex string) error + func (data *MultisigTXData) ToJSONHex() (string, error) + type RawTransaction struct + AddressBytes [32]byte + Amount int64 + HashAnchorBytes [32]byte + Input []byte + LockUntil uint32 + Prefix uint8 + SignBytes []byte + SizeIn uint8 + SizeOut uint8 + SizeSign uint64 + Timestamp uint32 + TxFee int64 + Typ uint16 + VchData []byte + Version uint16 + func (rtx *RawTransaction) Encode(encodeSignData bool) (string, error) + func (rtx *RawTransaction) EncodeBytes(encodeSignData bool) ([]byte, error) + func (rtx *RawTransaction) Multisig(multisigAddrHex string, privk []byte) error + func (rtx *RawTransaction) SignWithHexedKey(privkHex string) error + func (rtx *RawTransaction) Txid() ([32]byte, error) + type TW struct + func (tw *TW) Continue(_continue bool) *TW + func (tw *TW) Copy() *TW + func (tw *TW) Equal(expected, actual interface{}, args ...interface{}) *TW + func (tw *TW) IsZero(v interface{}, args ...interface{}) *TW + func (tw *TW) Nil(x interface{}, args ...interface{}) *TW + func (tw *TW) NotZero(v interface{}, args ...interface{}) *TW + func (tw *TW) True(flag bool, args ...interface{}) *TW + type Transaction struct + Address string + HashAnchor string + Sign string + func DecodeRawTransaction(txData string, decodeSignData bool) (*Transaction, error)