2015-01-11 15:43:07 +00:00
|
|
|
from libc.stdint cimport uint32_t, uint8_t
|
|
|
|
|
2015-01-12 18:11:43 +00:00
|
|
|
cdef extern from "bip32.h":
|
2015-01-11 15:43:07 +00:00
|
|
|
|
|
|
|
ctypedef struct HDNode:
|
|
|
|
uint8_t public_key[33]
|
|
|
|
|
2016-04-25 15:37:43 +00:00
|
|
|
int hdnode_from_seed(const uint8_t *seed, int seed_len, const char *curve, HDNode *out)
|
2015-01-11 15:43:07 +00:00
|
|
|
|
|
|
|
int hdnode_private_ckd(HDNode *inout, uint32_t i)
|
|
|
|
|
|
|
|
int hdnode_public_ckd(HDNode *inout, uint32_t i)
|
|
|
|
|
|
|
|
void hdnode_serialize_public(const HDNode *node, char *str, int strsize)
|
|
|
|
|
|
|
|
void hdnode_serialize_private(const HDNode *node, char *str, int strsize)
|
|
|
|
|
|
|
|
int hdnode_deserialize(const char *str, HDNode *node)
|
|
|
|
|
2015-01-12 18:11:43 +00:00
|
|
|
cdef extern from "ecdsa.h":
|
2015-01-11 15:43:07 +00:00
|
|
|
|
|
|
|
void ecdsa_get_address(const uint8_t *pub_key, uint8_t version, char *addr, int addrsize)
|