Documentation
¶
Index ¶
- func DetHash(h types.Hasher) string
- func DetHashInt(h int) string
- func DetHashString(h string) string
- func In(s string, cases []string) bool
- func JSONLen(value interface{}) int
- func MakeAddress(pubkeys []*btcec.PublicKey, n int) string
- func Max(a, b int) int
- func NotIn(s string, ss []string) bool
- func ParseKeyPair(privkey string) (*btcec.PrivateKey, *btcec.PublicKey)
- func Sign(msg []byte, privkey *btcec.PrivateKey) (*btcec.Signature, error)
- func Verify(msg []byte, sig *btcec.Signature, pubkey *btcec.PublicKey) bool
- func ZerosLeft(s string, size int) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DetHash ¶
Deterministically takes hash (defaults to sha256) of dict, list, int, or string. String representations, (what is feed into hash fn, in python+go pseudocode): - list: fmt.Sprintf("[%s]", ",".join(map(det, sorted(payload)))) - dict: fmt.Sprintf("{%s}", ",".join(map(lambda p: det(p[0]) + ":" + det(p[1]), sorted(x.items())))) - int: str(payload) - string: payload return hash_(json.loads(json.dumps(payload_string))))
func DetHashInt ¶
func DetHashString ¶
func MakeAddress ¶
n is the number of pubkeys required to spend from this address.
func ParseKeyPair ¶
func ParseKeyPair(privkey string) (*btcec.PrivateKey, *btcec.PublicKey)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.