Skip to content
Snippets Groups Projects
Commit 462815ae authored by alexey.stratulat's avatar alexey.stratulat
Browse files

[*] Completed the implementation of the createWithSeed function.

parent df37ae6b
No related branches found
No related tags found
1 merge request!1Features 2773
......@@ -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
......
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment