diff --git a/include/dap_chain_wallet_python.h b/include/dap_chain_wallet_python.h index 8dffa4dcf4193b19dea6d7b8f6d64578f5635d93..f08c58670b35d33362b98b5eb40ae9a4031cf26b 100644 --- a/include/dap_chain_wallet_python.h +++ b/include/dap_chain_wallet_python.h @@ -6,6 +6,7 @@ #include "dap_chain_wallet.h" #include "wrapping_dap_chain_common.h" #include "libdap_crypto_key_python.h" +#include "wrapping_dap_sign.h" //#include "wrapping_dap_sign #ifdef __cplusplus diff --git a/src/dap_chain_wallet_python.c b/src/dap_chain_wallet_python.c index f9712b2e3d3848543921a4e766969431b94654e0..323ac6e98797130cf61bc2ef0c951f4bee93999c 100644 --- a/src/dap_chain_wallet_python.c +++ b/src/dap_chain_wallet_python.c @@ -26,7 +26,16 @@ PyObject *dap_chain_wallet_create_with_seed_py(PyObject *self, PyObject *argv){ PyErr_SetString(PyExc_TypeError, "Fourth argument to not have a Bytes object type"); return NULL; } - return NULL;; + void *seed = (void *)PyBytes_AsString(obj_seed); + size_t seed_size = PyBytes_Size(obj_seed); + PyObject *obj_wallet = _PyObject_New(&DapChainWallet_dapChainWalletType); + ((PyDapChainWalletObject*)obj_wallet)->wallet = dap_chain_wallet_create_with_seed( + wallet_name, + path_wallets, + *((PyDapSignTypeObject*)obj_sig_type)->sign_type, + seed, + seed_size); + return Py_BuildValue("(O)", obj_wallet); } PyObject *dap_chain_wallet_open_file_py(PyObject *self, PyObject *argv){ (void)self;