Wrap C++ Key object inside "bitcoin" namespace.
This commit is contained in:
parent
7da3c3b969
commit
7e23e5ba0e
@ -53,6 +53,8 @@ int static inline EC_KEY_regenerate_key(EC_KEY *eckey, const BIGNUM *priv_key)
|
|||||||
return(ok);
|
return(ok);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
namespace bitcoin {
|
||||||
|
|
||||||
void Key::Generate()
|
void Key::Generate()
|
||||||
{
|
{
|
||||||
if (!EC_KEY_generate_key(ec)) {
|
if (!EC_KEY_generate_key(ec)) {
|
||||||
@ -562,10 +564,12 @@ Key::SignSync(const Arguments& args)
|
|||||||
|
|
||||||
Persistent<FunctionTemplate> Key::s_ct;
|
Persistent<FunctionTemplate> Key::s_ct;
|
||||||
|
|
||||||
|
}; // namespace bitcoin
|
||||||
|
|
||||||
extern "C" void
|
extern "C" void
|
||||||
init (Handle<Object> target)
|
init (Handle<Object> target)
|
||||||
{
|
{
|
||||||
Key::Init(target);
|
bitcoin::Key::Init(target);
|
||||||
}
|
}
|
||||||
|
|
||||||
NODE_MODULE(native, init)
|
NODE_MODULE(native, init)
|
||||||
|
|||||||
@ -7,6 +7,8 @@
|
|||||||
using namespace v8;
|
using namespace v8;
|
||||||
using namespace node;
|
using namespace node;
|
||||||
|
|
||||||
|
namespace bitcoin {
|
||||||
|
|
||||||
class Key : ObjectWrap
|
class Key : ObjectWrap
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
@ -90,4 +92,6 @@ public:
|
|||||||
SignSync(const Arguments& args);
|
SignSync(const Arguments& args);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
}; // namespace bitcoin
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user