 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
- Variables
- func CreateEmptyTransactionAndMessage(inputs []Vin, outputs []Vout, version int, locktime, expiredtime int64) (string, []string, error)
- func Decode(input string, alphabet *Alphabet) ([]byte, error)
- func DecodeCheck(address string, prefix []byte) ([]byte, error)
- func Encode(input []byte, alphabet *Alphabet) string
- func EncodeCheck(prefix []byte, hash []byte) string
- func SignTransactionMessage(message string, prikey []byte) ([]byte, error)
- func VerifyAndCombineTransaction(emptyTrans string, sigPub []SigPub) (bool, string, error)
- type Alphabet
- type InputMsg
- type OutputMsg
- type SigPub
- type TransactionMsg
- type Vin
- type Vout
Constants ¶
This section is empty.
Variables ¶
      View Source
      
  var (
	BitcoinAlphabet = NewAlphabet("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")
)
    Alphabet: copy from https://en.wikipedia.org/wiki/Base58
      View Source
      
  var (
	ErrorInvalidBase58String = errors.New("invalid base58 string")
)
    Errors
Functions ¶
func DecodeCheck ¶
return prefix + hash + error
func EncodeCheck ¶
func SignTransactionMessage ¶
Types ¶
type Alphabet ¶
type Alphabet struct {
	// contains filtered or unexported fields
}
    Alphabet The base58 alphabet object.
func NewAlphabet ¶
NewAlphabet create a custom alphabet from 58-length string. Note: len(rune(alphabet)) must be 58.
type InputMsg ¶
type OutputMsg ¶
type SigPub ¶
func (SigPub) GenUnlockScript ¶
type TransactionMsg ¶
type TransactionMsg struct {
	Version     int         `json:"Version"`
	Hash        string      `json:"Hash"`
	Timestamp   int64       `json:"Timestamp"`
	LockTime    int64       `json:"Locktime"`
	ExpiredTime int64       `json:"ExpiredTime"`
	InputCount  int         `json:"InputCount"`
	OutputCount int         `json:"OutputCount"`
	Inputs      []InputMsg  `json:"Inputs"`
	Outputs     []OutputMsg `json:"Outputs"`
	Size        int         `json:"Size"`
}
    func (*TransactionMsg) Complete ¶
func (tm *TransactionMsg) Complete()
type Vin ¶
func (Vin) NewInputMsg ¶
 Click to show internal directories. 
   Click to hide internal directories.